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

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

Nevermind.  I realized that we have some code in the webapp which uses shindig 
which needed to be in concert with how the locked domains are being generated 
where I needed to also use a lowercase URL.  Now that I've resolved that, 
things do appear to be working as they should.  

> 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