-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/8439/
-----------------------------------------------------------
(Updated Jan. 21, 2013, 2:01 a.m.)
Review request for shindig, Ryan Baxter, Dan Dumont, Stanton Sievers, and Rich
Thompson.
Description
-------
The host name check is case sensitive in locked domain service.
org.apache.shindig.gadgets.HashLockedDomainService
@Override
public boolean isGadgetValidForHost(String host, Gadget gadget, String
container) {
container = getContainer(container);
if (isEnabled()) {
if (isGadgetReqestingLocking(gadget) || isHostUsingLockedDomain(host)
|| isDomainLockingEnforced(container)) {
String neededHost;
try {
neededHost = getLockedDomain(gadget, container);
} catch (GadgetException e) {
if (LOG.isLoggable(Level.WARNING)) {
LOG.log(Level.WARNING, "Invalid host for call.", e);
}
return false;
}
return host.equals(neededHost);
}
}
return true;
}
According to URL spec:
http://www.ietf.org/rfc/rfc3986.txt
Section 3.2.2.
Proposed fix is to replace equals with equalsIgnoreCase.
This addresses bug SHINDIG-1889.
https://issues.apache.org/jira/browse/SHINDIG-1889
Diffs
-----
http://svn.apache.org/repos/asf/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/HashLockedDomainService.java
1406188
http://svn.apache.org/repos/asf/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/uri/HashShaLockedDomainPrefixGenerator.java
1406188
Diff: https://reviews.apache.org/r/8439/diff/
Testing
-------
Done
Thanks,
Marshall Shi