ChenSammi commented on code in PR #11186:
URL: https://github.com/apache/ozone/pull/11186#discussion_r3910562566
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/security/STSSecurityUtil.java:
##########
@@ -160,6 +160,10 @@ private static Token<STSTokenIdentifier>
decodeTokenFromString(String encodedTok
// instead of failing the OM request.
try {
token.decodeFromUrlString(encodedToken);
+ final String canonical = token.encodeToUrlString();
+ if (!canonical.equals(encodedToken)) {
Review Comment:
Is heading and trailing blank space allowed?
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/security/STSSecurityUtil.java:
##########
@@ -160,6 +160,10 @@ private static Token<STSTokenIdentifier>
decodeTokenFromString(String encodedTok
// instead of failing the OM request.
try {
token.decodeFromUrlString(encodedToken);
+ final String canonical = token.encodeToUrlString();
+ if (!canonical.equals(encodedToken)) {
Review Comment:
Overall looks good. Is heading and trailing blank space allowed?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]