Skip to content

Commit c7815d8

Browse files
committed
Fix typos in Javadoc updates.
1 parent ab61e0c commit c7815d8

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/main/java/org/owasp/esapi/Encoder.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -94,17 +94,17 @@
9494
* stores some untrusted data item such as an email address from a user. A
9595
* developer thinks "let's output encode this and store the encoded data in
9696
* the database, thus making the untrusted data safe to use all the time, thus
97-
* saving all of use developers all the encoding troubles later on". On the surface,
97+
* saving all of us developers all the encoding troubles later on". On the surface,
9898
* that sounds like a reasonable approach. The problem is how to know what
9999
* output encoding to use, not only for now, but for all possible <i>future</i>
100100
* uses? It might be that the current application code base is only using it in
101-
* an HTML contexxt that is displayed in an HTML report or shown in an HTML
101+
* an HTML context that is displayed in an HTML report or shown in an HTML
102102
* context in the user's profile. But what if it is later used in a {@code mailto:} URL?
103103
* Then instead of HTML encoding, it would need to have URL encoding. Similarly,
104104
* what if there is a later switch made to use AJAX and the untrusted email
105105
* address gets used in a JavaScript context? The complication is that even if
106106
* you know with certainty today all the ways that an untrusted data item is
107-
* used in your application, it is genrally impossible to predict all the
107+
* used in your application, it is generally impossible to predict all the
108108
* contexts that it may be used in the future, not only in your application, but
109109
* in other applications that could access that data in the database.
110110
* </li>
@@ -119,7 +119,7 @@
119119
* URL encoding within JavaScript</a>. Be sure to read the entire thread.
120120
* The question itself is too nuanced to be answered in Javadoc, but now,
121121
* hopefully you are at least aware of the potential pitfalls. There is little
122-
* avaiable research or examples on how to do output encodeing when multiple
122+
* available research or examples on how to do output encoding when multiple
123123
* mixed encodings are required, although one that you may find useful is
124124
* <a href="https://arxiv.org/pdf/1804.01862.pdf" target="_blank"
125125
* rel="noopener noreferrer">
@@ -132,18 +132,18 @@
132132
* <pre>
133133
* &lt;/script&gt;alert(1)&lt;/script&gt;
134134
* </pre>
135-
* or similiar simplistic XSS attack payloads and if that is properly encoded
135+
* or similar simplistic XSS attack payloads and if that is properly encoded
136136
* (or, you don't see an alert box popped in your browser), you consider it
137137
* "problem fixed", consider the unit testing sufficient. Unfortunately, that
138-
* minimalist testing may not always detect places were you used the wrong decoder. You need to do better.
138+
* minimalist testing may not always detect places where you used the wrong decoder. You need to do better.
139139
* Fortunately, the aforementioned link,
140140
* <a href="https://arxiv.org/pdf/1804.01862.pdf" target="_blank"
141141
* rel="noopener noreferrer">
142142
* Automated Detecting and Repair of Cross-SiteScripting Vulnerabilities through Unit Testing</a>
143143
* provides some insight. You may also wish to look at the
144144
* <a href="https://github.com/ESAPI/esapi-java-legacy/blob/develop/src/test/java/org/owasp/esapi/reference/EncoderTest.java"
145145
* target="_blank" rel="noopener noreferrer">ESAPI Encoder JUnittest cases</a>.
146-
* If you are really ambitious, an excellent resource for XSS attack patters is
146+
* If you are really ambitious, an excellent resource for XSS attack patterns is
147147
* <a href="https://beefproject.com/" target="_blank" rel="noopener noreferrer">BeEF - The Browser Exploitation Framework Project</a>.
148148
* </li>
149149
* </ul>

0 commit comments

Comments
 (0)