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 {
24
24
25
25
/**
26
26
* Holds if the cookie is likely an authentication cookie or otherwise sensitive.
27
- * Can never hold for client-side cookies.
28
27
*/
29
28
abstract predicate isSensitive ( ) ;
30
29
31
30
/**
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.
33
32
*/
34
33
predicate isServerSide ( ) {
35
34
any ( ) // holds by default. Client-side cookie writes should extend ClientSideCookieWrite.
Original file line number Diff line number Diff line change 6
6
<overview >
7
7
<p >
8
8
Authentication cookies stored by a server can be accessed by a client if the <code >httpOnly</code > flag is not set.
9
- <p >
9
+ </ p >
10
10
<p >
11
11
An attacker that manages a cross-site scripting (XSS) attack can read the cookie and hijack the session.
12
12
</p >
@@ -18,8 +18,6 @@ Set the <code>httpOnly</code> flag on all cookies that are not needed by the cli
18
18
</p >
19
19
</recommendation >
20
20
21
- <references >
22
-
23
21
<example >
24
22
<p >
25
23
The 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.
22
22
The following example stores an authentication token in a cookie that can
23
23
be transmitted in clear text.
24
24
</p >
25
- <sample src =" examples/CleartextStorageBad .js" />
25
+ <sample src =" examples/ClearTextCookieBad .js" />
26
26
<p >
27
27
To force the cookie to be transmitted using SSL, set the <code >secure</code >
28
28
attribute on the cookie.
29
29
</p >
30
- <sample src =" examples/CleartextStorageGood .js" />
30
+ <sample src =" examples/ClearTextCookieGood .js" />
31
31
</example >
32
32
33
33
<references >
You can’t perform that action at this time.
0 commit comments