Skip to content

Commit f3bce38

Browse files
author
drighetto
committed
Enhance docs - #1
1 parent 4d00918 commit f3bce38

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/main/java/eu/righettod/SecurityUtils.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -542,10 +542,10 @@ public static boolean isPublicIPAddress(String ip) {
542542
}
543543

544544
/**
545-
* Compute a SHA256 hash from an input composed of a collection of strings.<br>
546-
* This method take care to build the source string in a way to prevent this source string to be prone to abuse targeting the different parts composing it.<br>
545+
* Compute a SHA256 hash from an input composed of a collection of strings.<br><br>
546+
* This method take care to build the source string in a way to prevent this source string to be prone to abuse targeting the different parts composing it.<br><br>
547547
* Example of possible abuse without precautions applied during the hash calculation logic:<br>
548-
* Hash of <code>SHA256("Hello", "My", "World!!!")</code> will be equals to the hash of <code>SHA256("Hell", "oMyW", "orld!!!")</code>.<br>
548+
* Hash of <code>SHA256("Hello", "My", "World!!!")</code> will be equals to the hash of <code>SHA256("Hell", "oMyW", "orld!!!")</code>.<br><br>
549549
* This method ensure that both hash above will be different.
550550
*
551551
* @param parts Ordered list of strings to use to build the input string for which the hash must be computed on. No null value is accepted on object composing the collection.
@@ -572,8 +572,8 @@ public static byte[] computeHashNoProneToAbuseOnParts(List<String> parts) throws
572572
}
573573

574574
/**
575-
* Ensure that an XML file only uses DTD/XSD references (called System Identifier) present in the allowed list provided.<br>
576-
* The code is based on the validation implemented into the OpenJDK 21, by the class <b><a href="https://github.com/openjdk/jdk/blob/jdk-21%2B35/src/java.prefs/share/classes/java/util/prefs/XmlSupport.java">java.util.prefs.XmlSupport</a></b>, in the method <b><a href="https://github.com/openjdk/jdk/blob/jdk-21%2B35/src/java.prefs/share/classes/java/util/prefs/XmlSupport.java#L240">loadPrefsDoc()</a></b>.<br>
575+
* Ensure that an XML file only uses DTD/XSD references (called System Identifier) present in the allowed list provided.<br><br>
576+
* The code is based on the validation implemented into the OpenJDK 21, by the class <b><a href="https://github.com/openjdk/jdk/blob/jdk-21%2B35/src/java.prefs/share/classes/java/util/prefs/XmlSupport.java">java.util.prefs.XmlSupport</a></b>, in the method <b><a href="https://github.com/openjdk/jdk/blob/jdk-21%2B35/src/java.prefs/share/classes/java/util/prefs/XmlSupport.java#L240">loadPrefsDoc()</a></b>.<br><br>
577577
* The method also ensure that no Public Identifier is used to prevent potential bypasses of the validations.
578578
*
579579
* @param xmlFilePath Filename of the XML file to check.

0 commit comments

Comments
 (0)