todmorrison commented on pull request #286: URL: https://github.com/apache/shiro/pull/286#issuecomment-823424307
Hi @fpapon, You're right. I partially amend my comment. The first part, changing: ```if (isKeyValueSeparatorChar(c) && !isCharEscaped(line, i) && !isCharEscaped(line, i-1)) ``` to ```if (isKeyValueSeparatorChar(c) && !isCharEscaped(line, i-1))``` is correct. The middle case is redundant since `isKeyValueSeparatorChar(c)` where `c = line.charAt(i)` means the character at `i` is "=" and certainly not "\". For the second part, `(!isCharEscaped(line, i) || !isCharEscaped(line, i-1) `, this fails the test for "Tru\\th=Beauty" = "Truth", which still doesn't look right to me but my "fix" doesn't solve the problem either. Specifically, I feel that backslashes should be allowed in the key (and possibly other escape sequences), but this is harder than I originally thought. (A project for another day). Anyway, I do feel my observation that the middle case in the first conditional is redundant is worth fixing. I withdraw the second change though. -- 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]
