bmhm commented on a change in pull request #210: [SHIRO-530] INI parser does
not properly handled backslashes at end o…
URL: https://github.com/apache/shiro/pull/210#discussion_r406378626
##########
File path: config/core/src/test/groovy/org/apache/shiro/config/IniTest.groovy
##########
@@ -119,24 +135,40 @@ public class IniTest {
assertEquals("Truth", kv[0]);
assertEquals("Beauty", kv[1]);
+ // Escape characters are to be removed from the key.
+ // This is different behaviour compared to the XML config.
test = "Tru\\th=Beauty";
kv = Ini.Section.splitKeyValue(test);
assertEquals("Truth", kv[0]);
assertEquals("Beauty", kv[1]);
- test = "Truth\\=Beauty";
+ // SHIRO-530: Keep backslashes in value.
+ test = "Truth=Beau\\ty";
kv = Ini.Section.splitKeyValue(test);
assertEquals("Truth", kv[0]);
- assertEquals("Beauty", kv[1]);
+ assertEquals("Beau\\ty", kv[1]);
- test = "Truth=Beau\\ty";
+ // SHIRO-530: Keep backslashes in value.
+ test = "Truth=Beauty\\";
Review comment:
@bdemers see here:
https://github.com/apache/shiro/blob/b50b829a285b106666b688a4b69a3ebee94f51b4/config/core/src/main/java/org/apache/shiro/config/Ini.java#L609-L631
Please check if I did not mis-read it.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services