File tree Expand file tree Collapse file tree 3 files changed +4
-7
lines changed
lib/semmle/javascript/frameworks Expand file tree Collapse file tree 3 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -24,12 +24,11 @@ module CookieWrites {
2424
2525 /**
2626 * Holds if the cookie is likely an authentication cookie or otherwise sensitive.
27- * Can never hold for client-side cookies.
2827 */
2928 abstract predicate isSensitive ( ) ;
3029
3130 /**
32- * Holds if the cookie write happens on a server, that is `httpOnly` flag is relevant.
31+ * Holds if the cookie write happens on a server, i.e. the `httpOnly` flag is relevant.
3332 */
3433 predicate isServerSide ( ) {
3534 any ( ) // holds by default. Client-side cookie writes should extend ClientSideCookieWrite.
Original file line number Diff line number Diff line change 66<overview >
77<p >
88Authentication cookies stored by a server can be accessed by a client if the <code >httpOnly</code > flag is not set.
9- <p >
9+ </ p >
1010<p >
1111An attacker that manages a cross-site scripting (XSS) attack can read the cookie and hijack the session.
1212</p >
@@ -18,8 +18,6 @@ Set the <code>httpOnly</code> flag on all cookies that are not needed by the cli
1818</p >
1919</recommendation >
2020
21- <references >
22-
2321<example >
2422<p >
2523The following example stores an authentication token in a cookie that can
Original file line number Diff line number Diff line change @@ -22,12 +22,12 @@ attribute on the cookie.
2222The following example stores an authentication token in a cookie that can
2323be transmitted in clear text.
2424</p >
25- <sample src =" examples/CleartextStorageBad .js" />
25+ <sample src =" examples/ClearTextCookieBad .js" />
2626<p >
2727To force the cookie to be transmitted using SSL, set the <code >secure</code >
2828attribute on the cookie.
2929</p >
30- <sample src =" examples/CleartextStorageGood .js" />
30+ <sample src =" examples/ClearTextCookieGood .js" />
3131</example >
3232
3333<references >
You can’t perform that action at this time.
0 commit comments