[
https://issues.apache.org/jira/browse/SHIRO-684?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17044599#comment-17044599
]
Kevin Risden commented on SHIRO-684:
------------------------------------
I've been looking into upgrading to Shiro 1.5.x in Apache Knox in KNOX-2221. I
found a test failure in Apache Knox that looks to be caused by this jira.
It looks like there is no way to escape backslashes anymore? They are stripped
if you want to actually have a literal backslash.
This comes up in GatewayMultiFuncTest.testLdapSearchConfigEnhancementsKnox694:
{code:java}
<param>
<name>main.ldapRealm.principalRegex</name>
<value>(.*?)\\(.*)</value>
</param>
{code}
https://github.com/apache/knox/blob/master/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayMultiFuncTest/topologies/test-knox694-principal-regex-user-dn-template.xml#L45
The principalRegex goes from
{code:java}
(.*?)\\(.*)
{code}
to
{code:java}
(.*?)(.*)
{code}
which is a completely different value and therefore doesn't match.
> INI parser keeps escape characters in keys and values
> -----------------------------------------------------
>
> Key: SHIRO-684
> URL: https://issues.apache.org/jira/browse/SHIRO-684
> Project: Shiro
> Issue Type: Bug
> Components: Configuration
> Affects Versions: 1.3.2, 1.4.0
> Reporter: Nathan Jensen
> Assignee: Francois Papon
> Priority: Major
> Fix For: 1.5.0
>
> Time Spent: 1h 20m
> Remaining Estimate: 0h
>
> If I have a .ini file and I want to escape a character, the ini parser does
> not remove the escape character. For example, with a role such as "System\
> Administrator = permissions" the key becomes "System\ Administrator" and the
> value "permissions", i.e. the escape char \ is not removed. The bug is in
> Ini.Section.splitKeyValue(String). The code checks for an escape character
> but does not skip or remove the escape character from the buffer.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)