[ 
https://issues.apache.org/jira/browse/SHINDIG-1889?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13997645#comment-13997645
 ] 

Matt Merrill commented on SHINDIG-1889:
---------------------------------------

This does not appear to be fixed for me after updating to 2.5.0-beta6.  I'm 
still getting Invalid Domain errors when gadget URL's have caps in the name.  I 
checked the 2.5.0-update1 branch as well and the code touched doesn't appear to 
have changed with the exception of some checks for referrers added in.

Does a later update fix this?

> host name check is case sensitive in locked domain service
> ----------------------------------------------------------
>
>                 Key: SHINDIG-1889
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1889
>             Project: Shindig
>          Issue Type: Bug
>          Components: Java
>    Affects Versions: 2.5.0-beta5
>            Reporter: Marshall Shi
>             Fix For: 2.5.0-beta6
>
>         Attachments: hostname.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> 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 message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to