Skip to content

Commit 952e3b1

Browse files
authored
Whitespace check-in (#720)
@xeno6696 - Since @noloader touched all these files last, he owns them and is forever stuck doing bug fixes on them, right? Seriously, thanks Jeff. This is one of those bookkeeping matters that I generally don't require a GitHub issue for, but feel free to create one, assign it to yourself, and reference this PR if you would like. Up to you.
1 parent 0f4442d commit 952e3b1

File tree

316 files changed

+4190
-4190
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

316 files changed

+4190
-4190
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ ONLY use GitHub Issues for reporting bugs.
184184
# References: Where to Find More Information on ESAPI
185185
**OWASP Uncyclo:** https://owasp.org/www-project-enterprise-security-api/
186186

187-
**GitHub ESAPI Uncyclo:** https://github.com/ESAPI/esapi-java-legacy/wiki
187+
**GitHub ESAPI Uncyclo:** https://github.com/ESAPI/esapi-java-legacy/wiki
188188

189189
**General Documentation:** Under the '[documentation](https://github.com/ESAPI/esapi-java-legacy/tree/develop/documentation)' folder.
190190

documentation/ESAPI-configuration-user-guide.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,15 @@ until these deprecated methods are removed, but it will be a minumum of 2 years
4141
or 1 major release [e.g., 3.x], whichever comes first. Also, we may not
4242
necessarily remove all of them at once, depending on community feedback.)
4343

44-
DefaultSecurityConfiguration implements the new contract. New contract methods implementations work as described in
44+
DefaultSecurityConfiguration implements the new contract. New contract methods implementations work as described in
4545
'Multiple configuration files support' paragraph.
4646

4747
## Multiple configuration files support
4848

4949
EsapiPropertyManager is the new implementation for getting properties, which uses prioritized property loaders (each one associated with a specific configuration file). This allows to have multiple configuration files existing with priority connected to each one. At this moment, there
5050
are two configuration files possible to use, the path to them is set through following Java
5151
system properties:
52-
52+
5353
* org.owasp.esapi.opsteam = <full_path_to_file> (higher priority config)
5454
* org.owasp.esapi.devteam = <full_path_to_file> (lower priority config)
5555

@@ -86,9 +86,9 @@ ESAPI.securityConfiguration().getBooleanProp("propertyXXX");
8686
where "propertyXXX" is some property name relevant to ESAPI (and
8787
in this case, one that would hold a boolean value). See ESAPI.properties
8888
for a list of current property names known to ESAPI.
89-
89+
9090
In above example, following happens:
91-
91+
9292
1. org.owasp.esapi.opsteam configuration is used to get propertyXXX and return it as boolean.
9393
2. If (1) fails to find property, org.owasp.esapi.devteam is used to get propertyXXX and return it as boolean.
9494
3. If (2) fails to find property, ESAPI.properties is used to get propertyXXX and return it as boolean.

documentation/esapi4java-2.0-readme.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Here are the most significant directories and files included the zip file for th
77

88
File / Directory Description
99
=========================================================================================
10-
<root>/
10+
<root>/
1111
|
1212
+---configuration/ Directory of ESAPI configuration files
1313
| |

documentation/esapi4java-2.0rc6-override-log4jloggingfactory.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
This release includes critical changes to the ESAPI Log4JLogger that will now allow you to over-ride the user specific
1+
This release includes critical changes to the ESAPI Log4JLogger that will now allow you to over-ride the user specific
22
message using your own User or java.security.Principal implementation.
33

44
There are a three critical steps that need to be taken to over-ride the ESAPI Log4JLogger:
@@ -23,8 +23,8 @@ ESAPI.Logger=com.yourcompany.logging.ExtendedLog4JFactory
2323

2424
And you should be all set!
2525

26-
PS: The original ESAPI Log4JLogging class used a secure random number as a replacement to logging the session ID. This allowed
27-
us to tie log messages from the same session together, without exposing the actual session id in the log file. The code looks
26+
PS: The original ESAPI Log4JLogging class used a secure random number as a replacement to logging the session ID. This allowed
27+
us to tie log messages from the same session together, without exposing the actual session id in the log file. The code looks
2828
like this, and you may wish to use it in your over-ridden version of getUserInfo.
2929

3030
HttpServletRequest request = ESAPI.httpUtilities().getCurrentRequest();
@@ -40,7 +40,7 @@ if ( request != null ) {
4040
}
4141
}
4242

43-
In fact, here is the entire original getUserInfo() implementation (that was tied to the ESAPI request and user object) –
43+
In fact, here is the entire original getUserInfo() implementation (that was tied to the ESAPI request and user object) –
4444
you may wish to emulate some of this.
4545

4646
public String getUserInfo() {
@@ -58,14 +58,14 @@ public String getUserInfo() {
5858
}
5959
}
6060
}
61-
61+
6262
// log user information - username:session@ipaddr
63-
User user = ESAPI.authenticator().getCurrentUser();
63+
User user = ESAPI.authenticator().getCurrentUser();
6464
String userInfo = "";
6565
//TODO - make type logging configurable
6666
if ( user != null) {
6767
userInfo += user.getAccountName()+ ":" + sid + "@"+ user.getLastHostAddress();
6868
}
69-
69+
7070
return userInfo;
7171
}

documentation/esapi4java-core-2.0-readme-crypto-changes.html

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ <H3>Symmetric Encryption in ESAPI 2.0rc1 and 2.0rc2</H3>
6363
always encrypt to the same ciphertext block, thus revealing patterns
6464
in the plaintext input. For example, these images from Uncyclopedia's
6565
<A HREF="http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation">Block
66-
cipher modes of operation</A> illustrate this point well:
66+
cipher modes of operation</A> illustrate this point well:
6767
</P>
6868
<TABLE BORDER=0 CELLPADDING=4 CELLSPACING=0>
6969
<TR>
@@ -92,7 +92,7 @@ <H3>Symmetric Encryption in ESAPI 2.0rc1 and 2.0rc2</H3>
9292
<P>Ciphertext encrypted with ECB cipher mode are also subject to
9393
&quot;block replay attacks&quot;. See Bruce Schneier's <A HREF="http://www.google.com/url?sa=t&amp;source=web&amp;ct=res&amp;cd=2&amp;url=http%3A%2F%2Fbooks.google.com%2Fbooks%3Fid%3DA6ZO2D6ayNwC%26pg%3DPT216%26lpg%3DPT216%26dq%3Decb%2B%2522block%2Breplay%2522%26source%3Dbl%26ots%3DiEbAWQpu0e%26sig%3D8xiUva4XKaAOfPJEPsULPAJPk88%26hl%3Den%26ei%3Da6yISoLQPJOuMI-Z_OkE%26sa%3DX%26oi%3Dbook_result%26ct%3Dresult%26resnum%3D2&amp;ei=a6yISoLQPJOuMI-Z_OkE&amp;rct=j&amp;q=ecb+%22block+replay%22&amp;usg=AFQjCNF-IjrE4dL7M2LELh48hYPP6A_bpQ"><I>Applied
9494
Cryptography: protocols, algorithms, and source code</I> </A>for
95-
details.
95+
details.
9696
</P>
9797
<P>In both ESAPI 2.0-rc1 and 2.0-rc2, one can choose other block
9898
ciphers (e.g. Blowfish) or other key sizes (e.g., 512-bit AES), but
@@ -123,7 +123,7 @@ <H3>Problems with Symmetric Encryption in ESAPI 2.0-rc1 and 2.0-rc2</H3>
123123
</OL>
124124
<H2>The Encryption Changes in ESAPI 2.0-rc3 and Later</H2>
125125
<P>Briefly speaking, the changes being implemented for ESAPI Java 2.0
126-
are:
126+
are:
127127
</P>
128128
<OL>
129129
<LI><P STYLE="margin-bottom: 0in">Starting in ESAPI Java 2.0-rc3,
@@ -156,7 +156,7 @@ <H2>The Encryption Changes in ESAPI 2.0-rc3 and Later</H2>
156156
response was deafening. There literally was but a single response
157157
and that was to kill off <CODE>LegacyJavaEncryptor</CODE><CODE><FONT FACE="Thorndale AMT, serif">.</FONT></CODE>
158158
(By this time, the two symmetric encryption interfaces in <CODE>Encryptor</CODE>
159-
had already been deprecated.)
159+
had already been deprecated.)
160160
</P>
161161
<LI><P>The byte-encoding has been changed from native byte encoding
162162
to UTF-8 byte-encoding throughout ESAPI 2.0 and not just for
@@ -167,7 +167,7 @@ <H2>The Encryption Changes in ESAPI 2.0-rc3 and Later</H2>
167167
guaranteed.</P>
168168
</OL>
169169
<H2>The Good, the Bad, and the Ugly</H2>
170-
<P>Or put another way, there are always trade-offs to be made...
170+
<P>Or put another way, there are always trade-offs to be made...
171171
</P>
172172
<H3>The Good</H3>
173173
<P>We get improved security by encouraging the use of stronger cipher
@@ -205,9 +205,9 @@ <H3>The Bad</H3>
205205
both to encrypt and decrypt. While it is not required that the IV be
206206
kept secret from adversaries, there are some attacks that are
207207
possible if the adversary is permitted to alter the IV at will and
208-
observe the results of the ensuing decryption attempt.
208+
observe the results of the ensuing decryption attempt.
209209
</P>
210-
<P>So that leaves two choices for the IV:
210+
<P>So that leaves two choices for the IV:
211211
</P>
212212
<UL>
213213
<LI><P STYLE="margin-bottom: 0in">Using a <I><B>fixed IV</B></I>:
@@ -223,7 +223,7 @@ <H3>The Bad</H3>
223223
persisted (e.g., to a database) or transmitted to the recipient this
224224
random IV must be stored / made known. Therefore, the raw ciphertext
225225
can no longer suffice; whatever random IV that was chosen must be
226-
communicated.
226+
communicated.
227227
</P>
228228
</UL>
229229
<P>Likewise, the use of padding is going to add some overhead to the
@@ -360,7 +360,7 @@ <H3>The Bad</H3>
360360
cipher block size is 128-bits, but more typically, a cipher's block
361361
size is 64-bits so the padding would be between 1 to 16 bytes for AES
362362
and 1 to 8 bytes for a 64-bit block size cipher and the IV would be
363-
IV would be 16 bytes for AES and 8 bytes for most other ciphers.
363+
IV would be 16 bytes for AES and 8 bytes for most other ciphers.
364364
</P>
365365
<H3>The Ugly</H3>
366366
<P>Well, so far, this &quot;bad&quot; news may be bad for you but
@@ -370,7 +370,7 @@ <H3>The Ugly</H3>
370370
<P>But wait Skippy, don't go running off just quite yet. As Robert
371371
Heinlein wrote in his 1966 novel <I>The Moon is a Harsh Mistress</I>
372372
&quot;There ain't no such thing as a free lunch&quot;. (Some of us
373-
more hardened cynics know it more commonly as <I>TANSTAAFL</I>.)
373+
more hardened cynics know it more commonly as <I>TANSTAAFL</I>.)
374374
</P>
375375
<P>As mentioned earlier, backward compatibility with ESAPI 1.4
376376
(originally planned via <CODE>LegacyJavaEncryptor</CODE>) has been
@@ -395,11 +395,11 @@ <H3>The Ugly</H3>
395395
complexity of handling the ciphertext result from encryption
396396
operations. And then there are new encryption and decryption methods
397397
for the <CODE>Encryptor</CODE> interface. Specifically, the encrypt
398-
and decrypt methods have been generalized as:
398+
and decrypt methods have been generalized as:
399399
</P>
400400
<PRE STYLE="margin-left: 0.49in"><FONT COLOR="#000000"><FONT FACE="Monospace">CipherText encrypt(SecretKey key, PlainText plaintext)</FONT></FONT>
401401
<FONT COLOR="#000000"> <FONT FACE="Monospace">throws EncryptionException;</FONT></FONT></PRE><P STYLE="margin-bottom: 0in">
402-
and
402+
and
403403
</P>
404404
<PRE STYLE="margin-left: 0.49in"><FONT COLOR="#000000"><FONT FACE="Monospace">PlainText decrypt(SecretKey key, CipherText ciphertext)</FONT></FONT>
405405
<FONT COLOR="#000000"> <FONT FACE="Monospace">throws EncryptionException</FONT></FONT></PRE><P>
@@ -409,7 +409,7 @@ <H3>The Ugly</H3>
409409
based on <FONT FACE="DejaVu Sans Mono, sans-serif">Encryptor.MasterKey</FONT>.)</P>
410410
<P>The two existing interfaces from ESAPI 1.4 and earlier:</P>
411411
<PRE STYLE="margin-left: 0.49in; margin-bottom: 0.2in">String encrypt(String plaintext) throws EncryptionException</PRE><P STYLE="margin-bottom: 0in">
412-
and
412+
and
413413
</P>
414414
<PRE STYLE="margin-left: 0.49in; margin-bottom: 0.2in">String decrypt(String ciphertext) throws EncryptionException</PRE><P>
415415
are still supported but have been <I>deprecated</I>, mainly because

documentation/esapi4java-core-2.0-symmetric-crypto-user-guide.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ <H2>ESAPI.properties Properties Relevant to Symmetric Encryption</H2>
353353
<H2>How the Old (Deprecated) Methods Were Used</H2>
354354
<P>To encrypt / decrypt using the String-based, deprecated methods
355355
carried over from ESAPI 1.4, code similar to the following would be
356-
used.
356+
used.
357357
</P>
358358
<PRE> String myplaintext = &quot;My plaintext&quot;;
359359
try {
@@ -411,10 +411,10 @@ <H2>Encrypting / Decrypting with the New Methods -- The Simple Usage</H2>
411411
<P>Using the new encryption / decryption methods is somewhat more
412412
complicated, but this is in part because they are more flexible and
413413
that flexibility means that more information needs to be communicated
414-
as to the details of the encryption.
414+
as to the details of the encryption.
415415
</P>
416416
<P>A code snippet using the new methods that use the master
417-
encryption key would look something like this:
417+
encryption key would look something like this:
418418
</P>
419419
<PRE> String myplaintext = &quot;My plaintext&quot;;
420420
try {
@@ -432,7 +432,7 @@ <H2>Encrypting / Decrypting with the New Methods -- The Simple Usage</H2>
432432
mode is chosen.</P>
433433
<P>Also, these new methods allow a general byte array to be
434434
encrypted, not just a Java String. If one needed to encrypt a byte
435-
array with the old deprecated method, one would first have to use
435+
array with the old deprecated method, one would first have to use
436436
</P>
437437
<PRE> byte[] plaintextByteArray = { /* byte array to be encrypted */ };
438438
String plaintext = new String(plaintextByteArray, &quot;UTF-8&quot;);</PRE><P>
@@ -541,7 +541,7 @@ <H3>Encrypting / Decrypting with the New Methods</H3>
541541
encrypted bank account numbers are to be sent to one recipient and
542542
the encrypted credit card numbers are to be sent to a different
543543
recipient. Obviously in such cases, you do not want to share the same
544-
key for both recipients.
544+
key for both recipients.
545545
</P>
546546
<P>In ESAPI 1.4 there was not much you can do, but in ESAPI 2.0 and
547547
later, there are new encryption / decryption methods that allow you
@@ -553,14 +553,14 @@ <H3>Encrypting / Decrypting with the New Methods</H3>
553553
distributed to the recipients out-of-band. On you could distribute
554554
them dynamically via asymmetric encryption assuming that you've
555555
previously exchanged public keys with the recipients.)</P>
556-
<P>The following illustrates how these new methods might be used.
556+
<P>The following illustrates how these new methods might be used.
557557
</P>
558558
<P>First, we would generate some appropriate secret keys and
559559
distribute them securely (e.g., perhaps over SSL/TLS) or exchange
560560
them earlier out-of-band to the intended recipients. (E.g., one could
561561
put them on two separate thumb drives and use a trusted courier to
562562
distribute them to the recipients or one could use PGP-mail or S/MIME
563-
to securely email them, etc.)
563+
to securely email them, etc.)
564564
</P>
565565
<PRE> // Generate two random, 128-bit AES keys to be distributed out-of-band.
566566
import javax.crypto.SecretKey;
@@ -587,10 +587,10 @@ <H3>Encrypting / Decrypting with the New Methods</H3>
587587
Second, these keys would be printed out and stored somewhere secure
588588
by our application, perhaps using something like ESAPI's
589589
<CODE>EncryptedProperties</CODE> class, where they could later be
590-
retrieved and used.
590+
retrieved and used.
591591
</P>
592592
<P>In the following code, we assume that the <CODE>SecretKey</CODE>
593-
values have already been initialized elsewhere.
593+
values have already been initialized elsewhere.
594594
</P>
595595
<PRE> SecretKey bankAcctKey = ...; // These might be read from EncryptedProperties
596596
SecretKey credCardKey = ...; // or from a restricted database, etc.

documentation/esapi4java-core-2.1-release-notes.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ESAPI for Java - 2.1.0 Release Notes
88
deprecated more than 2 years ago and they are known to be insecure
99
(they are vulnerable to padding oracle attacks), the ESAPI team has
1010
decided to remove them in accordance to their support policy.
11-
11+
1212
See comments for issue #306 for further details, as well as additional
1313
safety precautions that you may wish to take in the unlikely, but possible
1414
event that this vulnerability resulted in an actual security breach.
@@ -64,5 +64,5 @@ NOTE: A follow-up patch release is scheduled within the next few months to
6464
based on findings in Google Issue # 306. I will periodically try
6565
to keep the ESAPI mailing lists updated with the progress so watch
6666
there for emerging details and anticipated schedule.
67-
67+
6868
-Kevin W. Wall <[email protected]>, 2013-08-30

documentation/esapi4java-core-2.2.0.0-release-notes.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Issue # GitHub Issue Title
4646
37 RandomAccessReferenceMap.update() can randomly corrupt the map
4747
71 java.lang.ExceptionInInitializerError in 2.0 version
4848
129 Add Logging support for SLF4J
49-
157 minimum-config deployment fails
49+
157 minimum-config deployment fails
5050
188 SecurityWrapperRequest seems to mishandle/swallow allowNull argument
5151
209 Build an encoding function specific to HTTP/Response Splitting (tactical remediation)
5252
213 Provide a taglib descriptor (.tld file)
@@ -116,7 +116,7 @@ Issue # GitHub Issue Title
116116
386 Avoid using System.err in EsapiPropertyManager
117117
387 &#39;mvn site&#39; fails for FindBugs report, causing &#39;site&#39; goal to fail
118118
389 Provide an option for the encodeForLDAP method to not encode wildcard characters
119-
394 Refactor Validator.getCanonicalizedUri into Encoder.
119+
394 Refactor Validator.getCanonicalizedUri into Encoder.
120120
395 Issues when I am passing htttp://localhost:8080/user=admin&amp;prodversion=no
121121
396 Trust Boundary Violation - while triggering veracode
122122
397 Update Resource path search to maintain legacy behavior in DefaultSecurityConfiguration.java
@@ -128,7 +128,7 @@ Issue # GitHub Issue Title
128128
417 Add additional protection against CVE-2016-1000031
129129
422 Inconsistent dependency structure and vulnerable xml (xerces, xalan, xml-apis ...) dependencies
130130
424 issue with Filename encoding for executeSystemCommand
131-
425 Project build error: Non-resolvable parent POM for org.owasp.esapi:esapi:2.1.0.2-SNAPSHOT: Could not transfer artifact
131+
425 Project build error: Non-resolvable parent POM for org.owasp.esapi:esapi:2.1.0.2-SNAPSHOT: Could not transfer artifact
132132
427 HTTP cookie validation rules too restrictive?
133133
429 Miscellaneous updates to pom.xml
134134
432 ESAPI.properties not found.
@@ -140,7 +140,7 @@ Issue # GitHub Issue Title
140140
442 Remove deprecated fields in Encoder interface
141141
444 Delete deprecated method Base64.decodeToObject() and related methods
142142
445 A bunch of dependencies are out of date , I will list them below with the associated vulnerability
143-
447 can&#39;t generate MasterKey / MasterSalt
143+
447 can&#39;t generate MasterKey / MasterSalt
144144
448 Clean up pom.xml
145145
454 about code eclipse formatter template question
146146
455 New release for mitigation of CVEs
@@ -194,7 +194,7 @@ Issue # GitHub Issue Title
194194

195195
Issue 483 More miscellaneous prep work for ESAPI 2.2.0.0 release
196196
Specifically, CipherText.getSerialVersionUID() and DefaultSecurityConfiguration.MAX_FILE_NAME_LENGTH have actually been deleted from the ESAPI code base. For the former, use CipherText.cipherTextVersion() instead. For the latter, there is no replacement. (This wasn't being used, but it was set to 1000 in case you're wondering.)
197-
197+
198198
* Various properties in ESAPI.properties were changed in a way that might affect your application:
199199
Issue 439 Tighten ESAPI defaults to disallow dubious file suffixes
200200

@@ -220,10 +220,10 @@ Issue # GitHub Issue Title
220220
Validator.HTTPQueryString=^([a-zA-Z0-9_\\-]{1,32}=[\\p{L}\\p{N}.\\-/+=_ !$*?@%]*&?)*$
221221
(Left as an exercise for the reader to figure out what exactly this means. ;-)
222222
Validator.HTTPURI: Changed to be much more restrictive; i.e., changed from:
223-
Validator.HTTPURI=^[a-zA-Z0-9()\\-=\\*\\.\\?;,+\\/:&_ ]*$
223+
Validator.HTTPURI=^[a-zA-Z0-9()\\-=\\*\\.\\?;,+\\/:&_ ]*$
224224
to:
225225
Validator.HTTPURI=^/([a-zA-Z0-9.\\-_]*/?)*$
226-
226+
227227
* Other changes:
228228
Issue 500 Suppress noise from ESAPI searching for properties and stop ignoring important IOExceptions
229229

@@ -241,7 +241,7 @@ Issue # GitHub Issue Title
241241

242242
Other changes in this release, some of which not tracked via GitHub issues
243243

244-
* Updated minimal version of Maven from 3.0 to 3.1 required to build ESAPI.
244+
* Updated minimal version of Maven from 3.0 to 3.1 required to build ESAPI.
245245
* Miscellaneous minor javadoc fixes and updates.
246246
* Added the Maven plug-in for OWASP Dependency Check so 3rd party dependencies can be kept up-to-date.
247247
* Updated .gitignore file with additional files to be ignored.

0 commit comments

Comments
 (0)