[Webkit-unassigned] [Bug 37228] Allow white listing access from origin to local origin

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Apr 7 14:19:27 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=37228


Erik Arvidsson <arv at chromium.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Platform|Other                       |All
         OS/Version|Mac OS X 10.5               |All
             Status|NEW                         |ASSIGNED
          Component|New Bugs                    |Page Loading
         AssignedTo|webkit-unassigned at lists.web |arv at chromium.org
                   |kit.org                     |




--- Comment #4 from Erik Arvidsson <arv at chromium.org>  2010-04-07 14:19:27 PST ---
(In reply to comment #2)
> (From update of attachment 52774 [details])
> I like the approach.  Two comments:
> 
>  301         if (OriginAccessWhiteList* list =
> originAccessMap().get(documentOrigin->toString())) {
>  302             PassRefPtr<SecurityOrigin> targetOrigin =
> SecurityOrigin::create(url);
>  303             for (size_t i = 0; i < list->size();  ++i) {
>  304                 if (list->at(i).matchesOrigin(*targetOrigin))
>  305                     return true;
>  306             }
>  307         }
> 
> This looks like copy/paste code.  Can we abstract that into a private method?

Done.

I was initially reluctant to do this since it requires us to always create the
targetOrigin SecuritOrigin even if the list is empty but I don't think this is
an issue since we only get here for local files and creating a SecurityOrigin
seems pretty cheap since it is done a lot already.

> 
> +var localImageLocation =
> layoutTestController.pathToLocalResource('file:///tmp/LayoutTests/http/tests/security/resources/compass.jpg');
> 
> Will this file URL work on all platforms (e.g., Windows)?  Is this how other
> tests do this?

This is how other tests do it. I only ran the test on Mac though.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list