Changes between Version 4 and Version 5 of Ticket #431

08/01/2014 10:18:50 AM (6 years ago)


  • Ticket #431 – Description

    v4 v5  
    44=== What to change === 
    55Remove the special handling for sitekeys in `lib/matcher.js` - they should be handled in exactly the same way as the `domain` option. That means that the filters are matched by the pattern part first, other options are checked later. This means that the sitekey needs to be added as a parameter for `Mather.matchesAny()` and `RegExpFilter.matches()`. The latter can check sitekey matches trivially. 
     7The complication here is: a valid sitekey should apply to the current page and any pages below it in the frame hierarchy. E.g. consider the following structure: 
     11|- frame1 (sitekey) 
     12   |- frame2 
     15We should consider the sitekey both when checking whether frame1 and frame2 are whitelisted. Also, any request triggered by frame1 or frame2 should be checked with the sitekey considered. top on the other hand is above the sitekey, so there it shouldn't be considered. 
     17There is also the unlikely scenario that there are multiple valid sitekeys in the hierarchy. IMHO we don't need to overcomplicate things here - whichever sitekey is closer should be used: 
     20top (sitekey1) 
     21|- frame1 (sitekey2) 
     22   |- frame2 
     25Here sitekey1 should be checked when determining whether top is whitelisted, also for any requests made by top. For frame1 and frame2 it is being overwritten with sitekey2 however, so sitekey2 should be used for these frames instead.