Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Issue 30045566: Fixed #4 - Disable rewrite option for all but internal redirect (Closed)

Created:
April 15, 2019, 8:23 p.m. by hub
Modified:
April 16, 2019, 2:09 p.m.
Base URL:
https://hg.adblockplus.org/adblockpluscore/
Visibility:
Public.

Description

Fixed #4 - Disable rewrite option for all but internal redirect

Patch Set 1 #

Patch Set 2 : Update tests. #

Total comments: 6

Patch Set 3 : Reworked patch #

Total comments: 6

Patch Set 4 : Review fixes. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+34 lines, -118 lines) Patch
M lib/filterClasses.js View 1 2 3 8 chunks +15 lines, -61 lines 0 comments Download
M test/filterClasses.js View 1 2 3 2 chunks +19 lines, -57 lines 0 comments Download

Messages

Total messages: 19
hub
April 15, 2019, 8:23 p.m. (2019-04-15 20:23:44 UTC) #1
hub
Still WiP (I need to fix the tests), but this is the almost minimu, patch ...
April 15, 2019, 8:24 p.m. (2019-04-15 20:24:36 UTC) #2
hub
updated patch
April 15, 2019, 8:52 p.m. (2019-04-15 20:52:56 UTC) #3
Manish Jethani
Is there a ticket in adblockpluscore for this? For the commit message, we just have ...
April 15, 2019, 8:58 p.m. (2019-04-15 20:58:01 UTC) #4
Manish Jethani
https://codereview.adblockplus.org/30045566/diff/30045569/lib/filterClasses.js File lib/filterClasses.js (left): https://codereview.adblockplus.org/30045566/diff/30045569/lib/filterClasses.js#oldcode1229 lib/filterClasses.js:1229: return resourceMap.get(this.resourceName) || url; If `resourceName` is `undefined` or ...
April 15, 2019, 9:26 p.m. (2019-04-15 21:26:37 UTC) #5
Manish Jethani
This condition in `lib/filterClasses.js` (two places) will never be `true` now: rewrite != null && ...
April 15, 2019, 9:46 p.m. (2019-04-15 21:46:13 UTC) #6
Manish Jethani
https://codereview.adblockplus.org/30045566/diff/30045569/test/filterClasses.js File test/filterClasses.js (right): https://codereview.adblockplus.org/30045566/diff/30045569/test/filterClasses.js#newcode331 test/filterClasses.js:331: compareFilter(test, "||content.server.com/files/*.php$rewrite=$1", ["type=invalid", "reason=filter_invalid_rewrite", "text=||content.server.com/files/*.php$rewrite=$1"]); Let's add a test ...
April 15, 2019, 9:48 p.m. (2019-04-15 21:48:49 UTC) #7
Manish Jethani
The `captureAll` parameter of `filterToRegExp()` is now useless.
April 15, 2019, 9:49 p.m. (2019-04-15 21:49:19 UTC) #8
Manish Jethani
On 2019/04/15 20:58:01, Manish Jethani wrote: > Is there a ticket in adblockpluscore for this? ...
April 15, 2019, 9:51 p.m. (2019-04-15 21:51:23 UTC) #9
Sebastian Noack
Following code in RegExpFilter.fromText() will be redundant after these changes, and therefore should be reomved: ...
April 15, 2019, 10:06 p.m. (2019-04-15 22:06:59 UTC) #10
hub
On 2019/04/15 20:58:01, Manish Jethani wrote: > Is there a ticket in adblockpluscore for this? ...
April 16, 2019, 4:11 a.m. (2019-04-16 04:11:40 UTC) #11
Sebastian Noack
On 2019/04/16 04:11:40, hub wrote: > On 2019/04/15 20:58:01, Manish Jethani wrote: > > Is ...
April 16, 2019, 4:17 a.m. (2019-04-16 04:17:40 UTC) #12
hub
On 2019/04/15 22:06:59, Sebastian Noack wrote: > Following code in RegExpFilter.fromText() will be redundant after ...
April 16, 2019, 4:35 a.m. (2019-04-16 04:35:15 UTC) #13
hub
updated patch. https://codereview.adblockplus.org/30045566/diff/30045569/lib/filterClasses.js File lib/filterClasses.js (left): https://codereview.adblockplus.org/30045566/diff/30045569/lib/filterClasses.js#oldcode1229 lib/filterClasses.js:1229: return resourceMap.get(this.resourceName) || url; On 2019/04/15 21:26:37, ...
April 16, 2019, 4:56 a.m. (2019-04-16 04:56:24 UTC) #14
Manish Jethani
https://codereview.adblockplus.org/30045566/diff/30045572/lib/filterClasses.js File lib/filterClasses.js (right): https://codereview.adblockplus.org/30045566/diff/30045572/lib/filterClasses.js#newcode745 lib/filterClasses.js:745: if (this.rewrite) This actually has a somewhat opposite of ...
April 16, 2019, 5:52 a.m. (2019-04-16 05:52:59 UTC) #15
hub
Updated patch https://codereview.adblockplus.org/30045566/diff/30045572/lib/filterClasses.js File lib/filterClasses.js (right): https://codereview.adblockplus.org/30045566/diff/30045572/lib/filterClasses.js#newcode745 lib/filterClasses.js:745: if (this.rewrite) On 2019/04/16 05:52:58, Manish Jethani ...
April 16, 2019, 12:23 p.m. (2019-04-16 12:23:06 UTC) #16
Manish Jethani
What branch/bookmark is this based on?
April 16, 2019, 12:26 p.m. (2019-04-16 12:26:10 UTC) #17
Manish Jethani
On 2019/04/16 12:26:10, Manish Jethani wrote: > What branch/bookmark is this based on? I see, ...
April 16, 2019, 12:28 p.m. (2019-04-16 12:28:19 UTC) #18
Manish Jethani
April 16, 2019, 12:43 p.m. (2019-04-16 12:43:29 UTC) #19
On 2019/04/16 12:28:19, Manish Jethani wrote:
> On 2019/04/16 12:26:10, Manish Jethani wrote:
> > What branch/bookmark is this based on?
> 
> I see, this is based on master.
> 
> LGTM
> 
> PS: Please land this directly in master.

To be clear, we will make this change (either by grafting or a separate patch)
in the next branch also, but first let's get it into master.

Powered by Google App Engine
This is Rietveld