Skip to content

Commit 3bcd879

Browse files
roylingdsmiley
authored andcommitted
Copy HttpOnly flag in proxy cookie (mitre#151)
* Copy HttpOnly flag in proxy cookie * Upgrade servlet-api to v3.0
1 parent 5caba46 commit 3bcd879

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

CHANGES.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11

22
# Version 1.11 (unreleased)
33

4+
\#151: Copy `HttpOnly` flag of proxy coookie to request clients, for fixing security vulnerabilities in cookies.
5+
This also updates `javax.servlet-api` to `v3.0.1`.
6+
47
\#139: Use Java system properties for http proxy (and other settings) by default.
58
This is a regression; it used to work this way in 1.8 and prior.
69
Thanks Thorsten Möller.

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@
6161
<!-- FYI tomcat 5.5 & beyond -->
6262
<dependency>
6363
<groupId>javax.servlet</groupId>
64-
<artifactId>servlet-api</artifactId>
65-
<version>2.4</version>
64+
<artifactId>javax.servlet-api</artifactId>
65+
<version>3.0.1</version>
6666
<scope>provided</scope>
6767
</dependency>
6868

src/main/java/org/mitre/dsmiley/httpproxy/ProxyServlet.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,7 @@ protected void copyProxyCookie(HttpServletRequest servletRequest,
505505
// don't set cookie domain
506506
servletCookie.setSecure(cookie.getSecure());
507507
servletCookie.setVersion(cookie.getVersion());
508+
servletCookie.setHttpOnly(cookie.isHttpOnly());
508509
servletResponse.addCookie(servletCookie);
509510
}
510511
}

0 commit comments

Comments
 (0)