-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve prevent-fetch
— return original url in response
#216
Comments
prevent-fetch
- return original url in responseprevent-fetch
— return original url in response
One more thing.
fetch('https://example.org/', { method: 'GET' }); Request should be "blocked", but it isn't.
As far as I understand, problem is in Scriptlets/src/scriptlets/prevent-fetch.js Line 114 in 3baf8d9
Scriptlets/src/helpers/fetch-utils.js Lines 67 to 86 in 3baf8d9
because it splits /^https?:\/\/example\.org/ into /^https? and \/\/example\.org/ , so it doesn't work like it should.I suppose that it's for init options, like method or headers , but currently it also splits URL.
I guess that the same issue is with |
Merge in ADGUARD-FILTERS/scriptlets from fix/AG-14514 to release/v1.7 Squashed commit of the following: commit 53cfe6a Merge: 1a0d9c5 c01dd65 Author: Stanislav A <[email protected]> Date: Tue Oct 25 16:06:50 2022 +0300 Merge branch 'release/v1.7' into fix/AG-14514 commit 1a0d9c5 Author: Stanislav A <[email protected]> Date: Fri Oct 21 14:19:56 2022 +0300 fix tests commit 2959639 Author: Stanislav A <[email protected]> Date: Fri Oct 21 14:14:57 2022 +0300 remove redundant whitespaces in tests assertions commit b39f05c Author: Stanislav A <[email protected]> Date: Fri Oct 21 14:13:04 2022 +0300 update build-tests: move helpers to MULTIPLE_TEST_FILES_DIR commit c35d374 Author: Stanislav A <[email protected]> Date: Thu Oct 20 13:14:15 2022 +0300 redo helpers tests file structure commit 5a659c2 Author: Stanislav A <[email protected]> Date: Thu Oct 20 12:56:33 2022 +0300 fix imports commit 3e3b940 Author: Stanislav A <[email protected]> Date: Thu Oct 20 12:46:47 2022 +0300 improve tests commit b9f9c1e Author: Stanislav A <[email protected]> Date: Wed Oct 19 20:09:20 2022 +0300 revert index.test typo commit bd76d2c Author: Stanislav A <[email protected]> Date: Wed Oct 19 20:07:36 2022 +0300 split helpers tests to separate files and fix typo in noopPromiseResolve commit 1bc6e81 Author: Stanislav A <[email protected]> Date: Wed Oct 19 19:40:22 2022 +0300 add arg parser test case commit 6509f76 Author: Stanislav A <[email protected]> Date: Wed Oct 19 19:23:36 2022 +0300 fix response type restrictions and add tests commit 44ed1ad Author: Stanislav A <[email protected]> Date: Wed Oct 19 17:01:43 2022 +0300 only allow opaque for responseType arg commit 562ad11 Author: Stanislav A <[email protected]> Date: Wed Oct 19 14:24:11 2022 +0300 fix typo and helper param description commit a9f9cdf Author: Stanislav A <[email protected]> Date: Wed Oct 19 14:05:28 2022 +0300 fix match prop parser and add tests commit d9c0c53 Author: Stanislav A <[email protected]> Date: Wed Oct 19 13:04:25 2022 +0300 add response type mock for noopPromiseResolve commit 2f886f0 Author: Stanislav A <[email protected]> Date: Fri Oct 14 15:09:04 2022 +0300 fix url parsing commit fac3e17 Author: Stanislav A <[email protected]> Date: Thu Oct 13 15:09:42 2022 +0300 remove defineProperty in favor of prop commit b9be4e5 Author: Stanislav A <[email protected]> Date: Tue Oct 11 20:49:11 2022 +0300 improve helper comments commit 9fa0ab1 Author: Stanislav A <[email protected]> Date: Mon Oct 10 17:34:00 2022 +0300 improve prevent-fetch
#201, #255, #254, #216, #202, #252, #251, #249, #23, #228, #215, #128 Squashed commit of the following: commit 9894d3c Author: Stanislav Atroschenko <[email protected]> Date: Mon Nov 21 15:27:04 2022 +0300 create CHANGELOG.md and fill it with 1.7 notes AG-17679 Merge in ADGUARD-FILTERS/scriptlets from feature/AG-17679 to release/v1.7 Squashed commit of the following: commit bccaff1 Merge: f28e33d 4ad761d Author: Stanislav A <[email protected]> Date: Mon Nov 21 15:19:45 2022 +0300 Merge branch 'release/v1.7' into feature/AG-17679 commit f28e33d Author: Stanislav A <[email protected]> Date: Mon Nov 21 15:09:46 2022 +0300 remove 'version' commit 8a5736f Author: Stanislav A <[email protected]> Date: Mon Nov 21 14:54:10 2022 +0300 set version to 1.7.1 commit 8e3653f Author: Stanislav A <[email protected]> Date: Mon Nov 21 13:22:52 2022 +0300 fix formatting commit 84f60c1 Author: Stanislav A <[email protected]> Date: Fri Nov 18 20:10:01 2022 +0300 fix formatting commit 56b2387 Author: Slava Leleka <[email protected]> Date: Fri Nov 18 20:02:22 2022 +0300 CHANGELOG.md edited online with Bitbucket commit a3da4c4 Author: Stanislav A <[email protected]> Date: Fri Nov 18 19:50:43 2022 +0300 improve formatting commit 6924f2f Author: Stanislav A <[email protected]> Date: Fri Nov 18 19:22:15 2022 +0300 create CHANGELOG.md and fill it with 1.7 notes commit 4ad761d Author: Stanislav Atroschenko <[email protected]> Date: Mon Nov 21 12:32:53 2022 +0300 Refactor src helpers AG-16980 Merge in ADGUARD-FILTERS/scriptlets from fix/AG-16980 to release/v1.7 Squashed commit of the following: commit 3443834 Author: Stanislav A <[email protected]> Date: Fri Nov 18 19:33:19 2022 +0300 fix misc commit cfd9486 Author: Stanislav A <[email protected]> Date: Fri Nov 18 17:41:33 2022 +0300 improve jsdoc for forced parameter commit 295c12b Author: Stanislav A <[email protected]> Date: Fri Nov 18 17:22:43 2022 +0300 update description for 'forced' arg of logMessage commit 03cba16 Author: Stanislav A <[email protected]> Date: Fri Nov 18 17:11:03 2022 +0300 add default value for logMessage 'forced' arg commit 4f80768 Author: Stanislav A <[email protected]> Date: Fri Nov 18 14:15:43 2022 +0300 add Source typedef commit 2056cb7 Author: Stanislav A <[email protected]> Date: Thu Nov 17 20:20:46 2022 +0300 redo logger & swap everywhere commit fa95a0b Merge: cb86ba7 48bd360 Author: Stanislav A <[email protected]> Date: Thu Nov 17 15:59:46 2022 +0300 resolve conflicts commit cb86ba7 Merge: 3cce20b ef618b3 Author: Stanislav A <[email protected]> Date: Wed Nov 16 19:09:40 2022 +0300 Merge branch 'release/v1.7' into fix/AG-16980 commit 3cce20b Author: Stanislav A <[email protected]> Date: Wed Nov 16 19:09:06 2022 +0300 redo typo commit 117da17 Author: Stanislav A <[email protected]> Date: Wed Nov 16 19:08:31 2022 +0300 remove legacy eslnit no-console directives commit a2b90e5 Author: Stanislav A <[email protected]> Date: Wed Nov 16 19:06:02 2022 +0300 add logVerbose to getLimitedStorageItemValue commit cb97abe Author: Stanislav A <[email protected]> Date: Wed Nov 16 14:21:58 2022 +0300 fix console.error calls commit 3ae7455 Author: Stanislav A <[email protected]> Date: Wed Nov 16 14:16:21 2022 +0300 fix logging in ga & log-on-stack-trace commit 4d2cb8f Author: Stanislav A <[email protected]> Date: Tue Nov 15 14:21:51 2022 +0300 fix jsdocs commit c7b0de8 Author: Stanislav A <[email protected]> Date: Tue Nov 15 13:51:15 2022 +0300 fix throttle imports commit f18dc3a Author: Stanislav A <[email protected]> Date: Fri Nov 11 15:43:00 2022 +0300 add getLimitedStorageItemValue helper commit e411fe3 Author: Stanislav A <[email protected]> Date: Fri Nov 11 15:23:29 2022 +0300 remove getWildcardSymbol helper commit dfd8ce1 Author: Stanislav A <[email protected]> Date: Fri Nov 11 15:07:46 2022 +0300 add log helpers & refactor logging in scriptlets commit 959fe50 Author: Stanislav A <[email protected]> Date: Fri Nov 11 12:35:41 2022 +0300 sort index commit e1b8933 Author: Stanislav A <[email protected]> Date: Thu Nov 10 19:29:09 2022 +0300 fix logging at trusted-replace-fetch-response ... and 6 more commits commit 48bd360 Author: Adam Wróblewski <[email protected]> Date: Wed Nov 16 20:38:39 2022 +0300 AG-13153 Improve abort-on-stack-trace. #201 Squashed commit of the following: commit 6d680d9 Merge: 436e1d2 ef618b3 Author: Adam Wróblewski <[email protected]> Date: Wed Nov 16 17:16:57 2022 +0100 Merge branch 'release/v1.7' into fix/AG-13153 commit 436e1d2 Author: Adam Wróblewski <[email protected]> Date: Wed Nov 16 14:10:11 2022 +0100 Rename helper Rename isInlineOrInjectedScript to shouldAbortInlineOrInjectedScript Move isInlineScript and isInjectedScript functions inside shouldAbortInlineOrInjectedScript Improve match-stack test commit 3782873 Author: Adam Wróblewski <[email protected]> Date: Tue Nov 15 13:23:21 2022 +0100 Move function to helper Fix eslint Add comment about location hash Use upper snake case in constants Add comment to regexp pattern Add description to syntax commit 0ab3d04 Author: Adam Wróblewski <[email protected]> Date: Mon Nov 14 08:25:31 2022 +0100 Add examples for inline and injected scripts commit fc2c355 Author: Adam Wróblewski <[email protected]> Date: Sun Nov 13 13:55:24 2022 +0100 Improve abort-on-stack-trace Add ability to abort inline and injected script Improve log-on-stack-trace - fix issue with logging in Firefox Fix maximum call stack size exceeded in getDescriptorAddon when Math.random is used Fix test for matchStackTrace commit ef618b3 Author: Stanislav Atroschenko <[email protected]> Date: Wed Nov 16 18:20:29 2022 +0300 Add test for checking logged import error AG-14327 Merge in ADGUARD-FILTERS/scriptlets from fix/AG-14327 to release/v1.7 Squashed commit of the following: commit 378af55 Author: Stanislav A <[email protected]> Date: Tue Nov 15 20:04:43 2022 +0300 add 'empty object in chain' test case for all related scriptlets commit c521ec8 Author: Stanislav A <[email protected]> Date: Mon Nov 14 18:46:59 2022 +0300 Add test for checking logged import error commit 3b228a6 Author: Slava Leleka <[email protected]> Date: Fri Nov 11 18:45:02 2022 +0200 delete empty space commit 134a31f Author: Stanislav Atroschenko <[email protected]> Date: Fri Nov 11 19:21:54 2022 +0300 add trusted scriptlets to readme AG-16962 Merge in ADGUARD-FILTERS/scriptlets from fix/AG-16962 to release/v1.7 Squashed commit of the following: commit 4f4e49c Author: Stanislav A <[email protected]> Date: Fri Nov 11 18:34:29 2022 +0300 improve allowed sources description commit 0f7ffea Author: Stanislav A <[email protected]> Date: Fri Nov 11 15:54:27 2022 +0300 move tag types to helpers commit d337805 Author: Stanislav A <[email protected]> Date: Fri Nov 11 15:49:25 2022 +0300 fix quotes commit 9d78d55 Author: Stanislav A <[email protected]> Date: Fri Nov 11 13:33:14 2022 +0300 update description & swap tag to trustedScriptlet commit 68ea2d8 Author: Stanislav A <[email protected]> Date: Thu Nov 10 15:50:28 2022 +0300 fix link commit 3b3dd16 Author: Stanislav A <[email protected]> Date: Thu Nov 10 15:22:06 2022 +0300 improve readme commit 9354743 Author: Stanislav A <[email protected]> Date: Thu Nov 10 14:13:11 2022 +0300 update tag on all trusteds and update about-trusteds commit c252d85 Merge: 9863ab2 356dd0d Author: Stanislav A <[email protected]> Date: Thu Nov 10 13:58:12 2022 +0300 Merge branch 'release/v1.7' into fix/AG-16962 commit 9863ab2 Author: Stanislav A <[email protected]> Date: Thu Nov 10 13:48:39 2022 +0300 add trustedscriptlet tag commit 69dc7c0 Author: Stanislav A <[email protected]> Date: Thu Nov 10 01:50:02 2022 +0300 build separate wiki page for trusted scriptlets commit c4a87c6 Merge: a93acba 0fb636b Author: Stanislav A <[email protected]> Date: Thu Nov 10 00:14:33 2022 +0300 Merge branch 'release/v1.7' into fix/AG-16962 commit a93acba Author: Stanislav A <[email protected]> Date: Thu Nov 10 00:05:54 2022 +0300 fix tables of contents back, fix typo commit a60a9c7 Author: Stanislav A <[email protected]> Date: Wed Oct 26 17:37:34 2022 +0300 move trusteds under Scriptlets commit 2adca6a Author: Stanislav A <[email protected]> Date: Fri Oct 14 17:33:41 2022 +0300 add trusted scriptlets to readme commit 356dd0d Author: Stanislav Atroschenko <[email protected]> Date: Thu Nov 10 13:57:47 2022 +0300 add trusted-set-local-storage-item scriptlet AG-16968 Merge in ADGUARD-FILTERS/scriptlets from feature/AG-16968 to release/v1.7 Squashed commit of the following: commit 86afca8 Merge: 197c20f 0fb636b Author: Stanislav A <[email protected]> Date: Thu Nov 10 13:50:14 2022 +0300 Merge branch 'release/v1.7' into feature/AG-16968 commit 197c20f Author: Stanislav A <[email protected]> Date: Wed Nov 9 23:55:29 2022 +0300 fix description commit 1a1b621 Author: Stanislav A <[email protected]> Date: Wed Nov 9 23:54:35 2022 +0300 improve parseKeywordValue helper & fix descriptions commit 852d01d Author: Stanislav A <[email protected]> Date: Wed Nov 9 16:38:56 2022 +0300 improve setItem helper to setStorageItem commit dbe58d1 Author: Stanislav A <[email protected]> Date: Wed Nov 9 16:26:37 2022 +0300 improve description for storage-related scriptlets commit f0e56ca Author: Stanislav A <[email protected]> Date: Wed Nov 9 16:23:43 2022 +0300 improve test cases commit edd4161 Author: Stanislav A <[email protected]> Date: Wed Nov 9 15:56:55 2022 +0300 improve logging for set-session-storage-item commit 1094308 Author: Stanislav A <[email protected]> Date: Wed Nov 9 15:50:16 2022 +0300 fix log message in setItem helper commit 190bc2c Author: Stanislav A <[email protected]> Date: Wed Nov 9 15:37:51 2022 +0300 improve guard and fix example commit 81bacc0 Author: Stanislav A <[email protected]> Date: Wed Nov 9 15:23:32 2022 +0300 fix comment commit ac5957c Author: Stanislav A <[email protected]> Date: Tue Nov 8 16:54:23 2022 +0300 add parseKeywordValue helper commit 1dd2f29 Author: Stanislav A <[email protected]> Date: Tue Nov 8 14:56:08 2022 +0300 add helper description commit 872a9ea Author: Stanislav A <[email protected]> Date: Tue Nov 8 14:54:02 2022 +0300 add setItems to helpers commit 600bf62 Author: Stanislav A <[email protected]> Date: Tue Nov 8 14:33:41 2022 +0300 add testcases & fix cName/Value to iName/Value commit d6335fd Merge: 1f7e95c 3327e89 Author: Stanislav A <[email protected]> Date: Tue Nov 8 14:12:02 2022 +0300 Merge branch 'release/v1.7' into feature/AG-16968 commit 1f7e95c Author: Stanislav A <[email protected]> Date: Tue Nov 8 14:01:27 2022 +0300 add value keywords & testcases stubs commit 6781691 Author: Stanislav A <[email protected]> Date: Mon Nov 7 20:59:01 2022 +0300 add description & usecases commit 8dd819d Author: Stanislav A <[email protected]> Date: Mon Nov 7 19:09:56 2022 +0300 add trusted-set-local-storage-item scriptelt commit 0fb636b Author: Adam Wróblewski <[email protected]> Date: Wed Nov 9 20:14:44 2022 +0300 AG-17390 fix google-ima3. #255 Squashed commit of the following: commit a8cf7ad Merge: b642bbd 1a375cf Author: Adam Wróblewski <[email protected]> Date: Wed Nov 9 18:02:29 2022 +0100 Merge branch 'release/v1.7' into fix/AG-17390 commit b642bbd Author: Adam Wróblewski <[email protected]> Date: Wed Nov 9 16:52:55 2022 +0100 Fix eslint commit 6996210 Author: Adam Wróblewski <[email protected]> Date: Wed Nov 9 16:04:37 2022 +0100 Improve google-ima3 - remove managerLoaded commit 1a375cf Author: Stanislav Atroschenko <[email protected]> Date: Wed Nov 9 18:51:03 2022 +0300 fix metrika-yandex-tag #254 AG-17129 Merge in ADGUARD-FILTERS/scriptlets from fix/AG-17129 to release/v1.7 Squashed commit of the following: commit 90a0f04 Author: Stanislav A <[email protected]> Date: Wed Nov 9 15:05:10 2022 +0300 fix metrika-yandex-tag commit f55b7ad Author: Stanislav Atroschenko <[email protected]> Date: Wed Nov 9 14:46:38 2022 +0300 fix redirects build AG-14398 Merge in ADGUARD-FILTERS/scriptlets from fix/AG-14398_01 to release/v1.7 Squashed commit of the following: commit ecf384b Author: Stanislav A <[email protected]> Date: Wed Nov 9 14:38:37 2022 +0300 fix redirects build commit 3327e89 Author: Stanislav Atroschenko <[email protected]> Date: Tue Nov 8 14:11:38 2022 +0300 add trusted-set-cookie scriptlet AG-16969 Merge in ADGUARD-FILTERS/scriptlets from feature/AG-16969 to release/v1.7 Squashed commit of the following: commit 9264fe5 Merge: 036c10a ee83930 Author: Stanislav A <[email protected]> Date: Tue Nov 8 14:02:56 2022 +0300 Merge branch 'release/v1.7' into feature/AG-16969 commit 036c10a Author: Stanislav A <[email protected]> Date: Tue Nov 8 12:10:56 2022 +0300 fix eslint comment commit caf2a24 Author: Stanislav A <[email protected]> Date: Mon Nov 7 20:29:34 2022 +0300 fix eslint comment commit b3b8d29 Author: Stanislav A <[email protected]> Date: Mon Nov 7 19:28:04 2022 +0300 fix null guard commit 639ab15 Author: Stanislav A <[email protected]> Date: Mon Nov 7 16:57:18 2022 +0300 fix scriptlet name in the description commit e1e5fc7 Merge: e7c6566 788f73a Author: Stanislav A <[email protected]> Date: Mon Nov 7 15:16:25 2022 +0300 fix trusted-replace-fetch logging commit e7c6566 Author: Stanislav A <[email protected]> Date: Mon Nov 7 15:10:12 2022 +0300 add null value guard to concatCookieNameValuePath commit 69367ab Author: Stanislav A <[email protected]> Date: Thu Nov 3 17:30:24 2022 +0300 move clearCookie to test/helpers commit 9f1f0d4 Author: Stanislav A <[email protected]> Date: Thu Nov 3 17:16:28 2022 +0300 redo helpers commit deb0cbb Author: Stanislav A <[email protected]> Date: Thu Nov 3 13:16:45 2022 +0300 fix comments & arg guard commit cd821d6 Author: Stanislav A <[email protected]> Date: Wed Nov 2 18:03:19 2022 +0300 improve cookie helpers commit 08810f9 Author: Stanislav A <[email protected]> Date: Wed Nov 2 17:14:16 2022 +0300 improve description commit bbf6812 Author: Stanislav A <[email protected]> Date: Tue Nov 1 14:59:00 2022 +0300 add logging on incorrect name-value input, improve description commit 080b89f Author: Stanislav A <[email protected]> Date: Tue Nov 1 14:46:29 2022 +0300 swap 'now' keyword to '$' commit 3fb1827 Author: Stanislav A <[email protected]> Date: Mon Oct 31 19:21:34 2022 +0300 move path parsing to a helper commit 9d9584e Author: Stanislav A <[email protected]> Date: Mon Oct 31 18:53:04 2022 +0300 fix the description commit ed23e25 Author: Stanislav A <[email protected]> Date: Mon Oct 31 14:02:28 2022 +0300 fix path arg & tests commit 6612144 Merge: 7379f0b 0bc5d92 Author: Stanislav A <[email protected]> Date: Mon Oct 31 13:04:20 2022 +0300 merge release/v1.7 commit 7379f0b Author: Stanislav A <[email protected]> Date: Thu Oct 27 13:17:26 2022 +0300 add path argument commit da7919e Author: Stanislav A <[email protected]> Date: Tue Oct 25 19:17:53 2022 +0300 remove unnecessary helper & improve guard comment ... and 13 more commits commit ee83930 Author: Stanislav Atroschenko <[email protected]> Date: Tue Nov 8 11:37:18 2022 +0300 AG-14398 Fix wiki build scripts Squashed commit of the following: commit 84393af Author: Slava Leleka <[email protected]> Date: Mon Nov 7 13:35:02 2022 +0200 delete obsolete comment commit 16bf367 Author: Slava Leleka <[email protected]> Date: Mon Nov 7 13:34:08 2022 +0200 fix getFilesList description commit d0d6c71 Author: Slava Leleka <[email protected]> Date: Mon Nov 7 13:33:16 2022 +0200 rename writeFile helper back commit 7790df7 Author: Slava Leleka <[email protected]> Date: Thu Nov 3 21:13:07 2022 +0200 fix specs -- update wiki about pages while build commit 74523b4 Author: Slava Leleka <[email protected]> Date: Thu Nov 3 21:11:56 2022 +0200 update readme commit c604e16 Author: Slava Leleka <[email protected]> Date: Thu Nov 3 21:11:41 2022 +0200 fix package.json scripts for wiki commit 11d2e3c Author: Slava Leleka <[email protected]> Date: Thu Nov 3 21:10:23 2022 +0200 do not throw error on some changes while checking compatibility table updated commit 162089f Merge: 4a4d308 788f73a Author: Slava Leleka <[email protected]> Date: Thu Nov 3 16:49:54 2022 +0200 Merge branch 'release/v1.7' into fix/AG-14398 commit 4a4d308 Author: Slava Leleka <[email protected]> Date: Thu Nov 3 00:03:26 2022 +0200 update package.json scripts for wiki commit a23f2b0 Author: Slava Leleka <[email protected]> Date: Thu Nov 3 00:02:31 2022 +0200 do not build compatibility table while build-docs commit a43af1b Author: Slava Leleka <[email protected]> Date: Thu Nov 3 00:01:54 2022 +0200 fix constants commit 24e51b6 Author: Slava Leleka <[email protected]> Date: Thu Nov 3 00:01:09 2022 +0200 fix getCurrentUBORedirects() commit 4c18c35 Author: Slava Leleka <[email protected]> Date: Wed Nov 2 23:25:32 2022 +0200 fix typo commit 456f7c0 Author: Slava Leleka <[email protected]> Date: Wed Nov 2 20:58:35 2022 +0200 change fixme to todo commit ec4e5e3 Author: Slava Leleka <[email protected]> Date: Wed Nov 2 20:57:37 2022 +0200 add comment for writeFileAsync commit 7d1ca12 Author: Slava Leleka <[email protected]> Date: Wed Nov 2 20:55:10 2022 +0200 refactor scripts methods, fix types commit f0e919f Author: Slava Leleka <[email protected]> Date: Wed Nov 2 18:56:32 2022 +0200 refactor build scripts helpers and constants commit d2b9c93 Author: Stanislav A <[email protected]> Date: Wed Nov 2 13:43:04 2022 +0300 Build wiki/compatibility-table.md while build commit 788f73a Author: Stanislav Atroschenko <[email protected]> Date: Thu Nov 3 17:39:58 2022 +0300 add trusted-replace-fetch-response scriptlet AG-17043 Merge in ADGUARD-FILTERS/scriptlets from feature/AG-17043 to release/v1.7 Squashed commit of the following: commit d9ab3c1 Author: Stanislav A <[email protected]> Date: Tue Nov 1 20:17:18 2022 +0300 fix logging in all request scriptlets commit 8d7d5a3 Author: Stanislav A <[email protected]> Date: Tue Nov 1 19:56:34 2022 +0300 improve log/matching forks for prevent-fetch, replace-fetch, replace-xhr commit d2f0562 Author: Stanislav A <[email protected]> Date: Tue Nov 1 17:01:05 2022 +0300 fix log condition commit 545d6b3 Author: Stanislav A <[email protected]> Date: Tue Nov 1 15:10:31 2022 +0300 move 'match all' logic to matchRequestProps logic commit 88e0d03 Author: Stanislav A <[email protected]> Date: Tue Nov 1 13:42:16 2022 +0300 improve forgeResponse and rename replacingRequest > forgedRequest for xhr scriptlet commit 7de569d Author: Stanislav A <[email protected]> Date: Tue Nov 1 13:13:39 2022 +0300 remove unused helper commit 65ee825 Author: Stanislav A <[email protected]> Date: Tue Nov 1 13:12:20 2022 +0300 fix description commit 1227b94 Author: Stanislav A <[email protected]> Date: Tue Nov 1 13:06:36 2022 +0300 fix toRegExp => toRegExp() commit e50b102 Author: Stanislav A <[email protected]> Date: Mon Oct 31 18:44:08 2022 +0300 use matchRequestProps helper in prevent-xhr & prevent-fetch commit 53b1904 Author: Stanislav A <[email protected]> Date: Mon Oct 31 18:39:52 2022 +0300 move helpers dependencies lower on the list commit 9e76de8 Author: Stanislav A <[email protected]> Date: Mon Oct 31 18:27:15 2022 +0300 add testcases commit dc8ab9d Author: Stanislav A <[email protected]> Date: Mon Oct 31 17:53:50 2022 +0300 add testcases commit 522ade9 Author: Stanislav A <[email protected]> Date: Mon Oct 31 17:20:00 2022 +0300 add replacement logic commit edafb05 Merge: e1ac8b5 0bc5d92 Author: Stanislav A <[email protected]> Date: Mon Oct 31 14:09:47 2022 +0300 Merge branch 'release/v1.7' into feature/AG-17043 commit e1ac8b5 Author: Stanislav A <[email protected]> Date: Tue Oct 25 14:10:02 2022 +0300 merge parent branch & use matchRequestProps commit b2cf83c Merge: 039c5b0 c01dd65 Author: Stanislav A <[email protected]> Date: Tue Oct 25 13:34:46 2022 +0300 Merge branch 'release/v1.7' into feature/AG-17043 commit 039c5b0 Author: Stanislav A <[email protected]> Date: Tue Oct 25 13:34:01 2022 +0300 add tests stub & fix logging logic commit acef717 Author: Stanislav A <[email protected]> Date: Mon Oct 24 19:48:53 2022 +0300 add replacement logic & improve description commit f96716d Author: Stanislav A <[email protected]> Date: Mon Oct 24 13:03:53 2022 +0300 add trsuted-replace-fetch-response scriptlet commit 0bc5d92 Author: Slava Leleka <[email protected]> Date: Thu Oct 27 15:01:17 2022 +0300 AG-17113 add path parameter to set cookie scriptlets Squashed commit of the following: commit 055f551 Author: Slava Leleka <[email protected]> Date: Thu Oct 27 14:26:42 2022 +0300 disallow to set unsupported cookie path commit 76ffe8f Author: Slava Leleka <[email protected]> Date: Thu Oct 27 14:24:31 2022 +0300 fix tests/helpers/index imports commit cdab0fe Author: Slava Leleka <[email protected]> Date: Tue Oct 25 19:23:57 2022 +0300 fix description for prepareCookie path arg commit 06f1d03 Author: Slava Leleka <[email protected]> Date: Tue Oct 25 19:12:40 2022 +0300 fix description for prepareCookie path arg commit ac00fb1 Merge: d435aac e05fefc Author: Slava Leleka <[email protected]> Date: Tue Oct 25 19:11:48 2022 +0300 Merge branch 'fix/AG-17113' into fix/AG-17113_01 commit e05fefc Author: Slava Leleka <[email protected]> Date: Tue Oct 25 15:26:21 2022 +0300 add path parameter to set cookie scriptlets commit d435aac Author: Stanislav Atroschenko <[email protected]> Date: Tue Oct 25 16:18:32 2022 +0300 improve prevent-fetch — return original url in response #216 AG-14514 Merge in ADGUARD-FILTERS/scriptlets from fix/AG-14514 to release/v1.7 Squashed commit of the following: commit 53cfe6a Merge: 1a0d9c5 c01dd65 Author: Stanislav A <[email protected]> Date: Tue Oct 25 16:06:50 2022 +0300 Merge branch 'release/v1.7' into fix/AG-14514 commit 1a0d9c5 Author: Stanislav A <[email protected]> Date: Fri Oct 21 14:19:56 2022 +0300 fix tests commit 2959639 Author: Stanislav A <[email protected]> Date: Fri Oct 21 14:14:57 2022 +0300 remove redundant whitespaces in tests assertions commit b39f05c Author: Stanislav A <[email protected]> Date: Fri Oct 21 14:13:04 2022 +0300 update build-tests: move helpers to MULTIPLE_TEST_FILES_DIR commit c35d374 Author: Stanislav A <[email protected]> Date: Thu Oct 20 13:14:15 2022 +0300 redo helpers tests file structure commit 5a659c2 Author: Stanislav A <[email protected]> Date: Thu Oct 20 12:56:33 2022 +0300 fix imports commit 3e3b940 Author: Stanislav A <[email protected]> Date: Thu Oct 20 12:46:47 2022 +0300 improve tests commit b9f9c1e Author: Stanislav A <[email protected]> Date: Wed Oct 19 20:09:20 2022 +0300 revert index.test typo commit bd76d2c Author: Stanislav A <[email protected]> Date: Wed Oct 19 20:07:36 2022 +0300 split helpers tests to separate files and fix typo in noopPromiseResolve commit 1bc6e81 Author: Stanislav A <[email protected]> Date: Wed Oct 19 19:40:22 2022 +0300 add arg parser test case commit 6509f76 Author: Stanislav A <[email protected]> Date: Wed Oct 19 19:23:36 2022 +0300 fix response type restrictions and add tests commit 44ed1ad Author: Stanislav A <[email protected]> Date: Wed Oct 19 17:01:43 2022 +0300 only allow opaque for responseType arg commit 562ad11 Author: Stanislav A <[email protected]> Date: Wed Oct 19 14:24:11 2022 +0300 fix typo and helper param description commit a9f9cdf Author: Stanislav A <[email protected]> Date: Wed Oct 19 14:05:28 2022 +0300 fix match prop parser and add tests commit d9c0c53 Author: Stanislav A <[email protected]> Date: Wed Oct 19 13:04:25 2022 +0300 add response type mock for noopPromiseResolve commit 2f886f0 Author: Stanislav A <[email protected]> Date: Fri Oct 14 15:09:04 2022 +0300 fix url parsing commit fac3e17 Author: Stanislav A <[email protected]> Date: Thu Oct 13 15:09:42 2022 +0300 remove defineProperty in favor of prop commit b9be4e5 Author: Stanislav A <[email protected]> Date: Tue Oct 11 20:49:11 2022 +0300 improve helper comments commit 9fa0ab1 Author: Stanislav A <[email protected]> Date: Mon Oct 10 17:34:00 2022 +0300 improve prevent-fetch commit c01dd65 Author: Stanislav Atroschenko <[email protected]> Date: Tue Oct 25 12:45:01 2022 +0300 add trusted-replace-xhr-response scriptlet #202 AG-13337 Merge in ADGUARD-FILTERS/scriptlets from feature/AG-13337 to release/v1.7 Squashed commit of the following: commit 009b6a7 Merge: 4ffc6ac af22d63 Author: Stanislav A <[email protected]> Date: Tue Oct 25 11:34:32 2022 +0300 Merge branch 'release/v1.7' into feature/AG-13337 commit 4ffc6ac Author: Stanislav A <[email protected]> Date: Tue Oct 25 11:33:42 2022 +0300 fix description commit 68e5994 Author: Stanislav A <[email protected]> Date: Mon Oct 24 19:57:31 2022 +0300 fix description commit 43b3d8d Author: Stanislav A <[email protected]> Date: Mon Oct 24 15:13:00 2022 +0300 fix pattern arg usage commit d02e1fe Author: Stanislav A <[email protected]> Date: Mon Oct 24 13:07:13 2022 +0300 secretXhr to replacingRequest commit fd49432 Author: Stanislav A <[email protected]> Date: Mon Oct 24 13:06:08 2022 +0300 improve match_all_characters_regex constant commit ed2a348 Author: Stanislav A <[email protected]> Date: Fri Oct 21 14:09:48 2022 +0300 add more comments commit 42b271b Author: Stanislav A <[email protected]> Date: Fri Oct 21 13:56:26 2022 +0300 improve content extraction commit 1a094c9 Author: Stanislav A <[email protected]> Date: Fri Oct 21 12:50:22 2022 +0300 improve description commit 94a419f Author: Stanislav A <[email protected]> Date: Fri Oct 21 12:49:03 2022 +0300 origOpen to nativeOpen, same for Send commit dee24bd Author: Stanislav A <[email protected]> Date: Fri Oct 21 12:44:49 2022 +0300 fix imports and injections order commit 3a1c7a0 Author: Stanislav A <[email protected]> Date: Thu Oct 20 19:26:51 2022 +0300 clear requestHeaders array after setting headers commit 11befc9 Author: Stanislav A <[email protected]> Date: Thu Oct 20 19:21:34 2022 +0300 miscellaneous fixes commit 12a5d9d Author: Stanislav A <[email protected]> Date: Thu Oct 20 18:54:47 2022 +0300 improve pattern and replacement args description commit 15f743d Author: Stanislav A <[email protected]> Date: Thu Oct 20 18:53:10 2022 +0300 redo replacement logic, move matching to matchRequestProps helper commit ae6d501 Author: Stanislav A <[email protected]> Date: Tue Oct 18 14:23:25 2022 +0300 fix example in description commit 72ba62b Author: Stanislav A <[email protected]> Date: Tue Oct 18 14:06:46 2022 +0300 update prevention condition commit e21452b Author: Stanislav A <[email protected]> Date: Tue Oct 18 13:50:30 2022 +0300 fix duplicate values commit 4a3bd7d Author: Stanislav A <[email protected]> Date: Tue Oct 18 13:49:34 2022 +0300 add alias comment commit 23769ef Merge: 0ee0f61 e1489ee Author: Stanislav A <[email protected]> Date: Tue Oct 18 13:48:48 2022 +0300 resolve conflict & merge with 1.7 ... and 12 more commits commit af22d63 Author: Adam Wróblewski <[email protected]> Date: Mon Oct 24 18:51:27 2022 +0300 AG-17071 improve googlesyndication-adsbygoogle — adsbygoogle.push. #252 Merge in ADGUARD-FILTERS/scriptlets from fix/AG-17071 to release/v1.7 Squashed commit of the following: commit 45daa0b Author: Adam <[email protected]> Date: Fri Oct 21 13:14:07 2022 +0200 Improve test commit 85a7677 Author: Adam <[email protected]> Date: Fri Oct 21 12:29:53 2022 +0200 Improve googlesyndication-adsbygoogle — adsbygoogle.push commit 932ff82 Author: Adam Wróblewski <[email protected]> Date: Tue Oct 18 19:44:50 2022 +0300 AG-17027 fix issue with isAbortingSuspended in abort-current-inline-script Squashed commit of the following: commit bde3e4b Author: Adam <[email protected]> Date: Tue Oct 18 15:04:48 2022 +0200 Update comment commit 0117103 Author: Adam <[email protected]> Date: Tue Oct 18 14:57:09 2022 +0200 Add comments to test commit 71d257b Author: Adam <[email protected]> Date: Tue Oct 18 14:45:41 2022 +0200 Revert changes in wiki commit 8e1ea58 Author: Adam <[email protected]> Date: Tue Oct 18 14:38:20 2022 +0200 Revert changes in wiki commit 0a48e7a Author: Adam <[email protected]> Date: Tue Oct 18 14:12:53 2022 +0200 Fix typo commit f0cf3ee Author: Adam <[email protected]> Date: Tue Oct 18 14:07:38 2022 +0200 Fix issue with isAbortingSuspended in abort-current-inline-script commit e1489ee Author: Adam Wróblewski <[email protected]> Date: Tue Oct 18 09:41:00 2022 +0300 AG-16687 add xml-prune scriptlet Squashed commit of the following: commit 18a5a61 Merge: 93efce6 0976bb9 Author: Slava Leleka <[email protected]> Date: Tue Oct 18 00:57:30 2022 +0300 Merge branch 'feature/AG-16687_01' of ssh://bit.adguard.com:7999/adguard-filters/scriptlets into feature/AG-16687_01 commit 93efce6 Merge: 10ee63d 66b417a Author: Slava Leleka <[email protected]> Date: Tue Oct 18 00:57:12 2022 +0300 merge release/v1.7 into feature/AG-16687_01, resolve conflicts commit 0976bb9 Author: Adam <[email protected]> Date: Fri Oct 14 18:47:47 2022 +0200 Remove unnecessary variable commit 10ee63d Author: Adam <[email protected]> Date: Fri Oct 14 14:51:54 2022 +0200 Return original value if response is not pruned Fix tests commit 0053d0c Author: Adam <[email protected]> Date: Fri Oct 14 11:40:53 2022 +0200 Remove unnecessary conditional statement commit 930dd6a Merge: fe26660 cfa9570 Author: Adam <[email protected]> Date: Thu Oct 13 12:41:31 2022 +0200 Merge branch 'release/v1.7' into feature/AG-16687_01 commit fe26660 Author: Adam <[email protected]> Date: Thu Oct 13 12:40:41 2022 +0200 Add common constant GET_METHOD for tests Remove unnecessary MPD_PATH commit 63c4bef Author: Adam <[email protected]> Date: Wed Oct 12 14:03:21 2022 +0200 Rename url to urlMatchRegexp commit e43bd18 Author: Adam <[email protected]> Date: Wed Oct 12 13:46:21 2022 +0200 Avoid regexp Improve log Add a note about usage without propsToMatch Change realFetch to nativeFetch Do not reassign input variable Add validity of xmlDoc Get rid of try...catch Remove unnecessary spaces in test file Fix endsWith function commit 8185ae3 Author: Adam <[email protected]> Date: Mon Oct 10 14:33:28 2022 +0200 Remove unnecessary hit function Rename shouldLog to shouldPruneResponse commit cf1f380 Author: Adam <[email protected]> Date: Fri Oct 7 17:47:07 2022 +0200 Update description commit f358b8a Author: Adam <[email protected]> Date: Fri Oct 7 14:36:48 2022 +0200 Rename checkIfXML functin to isXML commit c197e0a Author: Adam <[email protected]> Date: Fri Oct 7 14:28:45 2022 +0200 Add ability to log response in a browser console Add tests for logging Use assert.notOk Improve description Remove unnecessary hit function Simplify test file Add removeEventListener() method Improve function name (pruneXML) Add checkIfXML function and comment to it Check if Reflect is supported Add eslint-enable max-len Use indexOf() instead of includes() in tests Add more aliases commit 66b76c0 Author: Adam <[email protected]> Date: Tue Oct 4 10:19:31 2022 +0200 Add new scriptlet - `xml-prune` commit 66b417a Author: Stanislav Atroschenko <[email protected]> Date: Mon Oct 17 20:42:20 2022 +0300 add trusted-click-element scriptlet #23 AG-169 Merge in ADGUARD-FILTERS/scriptlets from feature/AG-169 to release/v1.7 Squashed commit of the following: commit d1a7f38 Merge: d7f0ae2 cfa9570 Author: Stanislav A <[email protected]> Date: Mon Oct 17 19:44:23 2022 +0300 Merge branch 'release/v1.7' into feature/AG-169 commit d7f0ae2 Author: Stanislav A <[email protected]> Date: Fri Oct 14 13:51:52 2022 +0300 add comment to delimiter regex commit 3477858 Author: Stanislav A <[email protected]> Date: Thu Oct 13 14:57:17 2022 +0300 add regexp to extraMatch parsing with a testcase commit 99fc8fc Author: Stanislav A <[email protected]> Date: Thu Oct 13 13:43:08 2022 +0300 improve parseCookieString commit ea51d04 Author: Stanislav A <[email protected]> Date: Wed Oct 12 18:38:59 2022 +0300 minor fixes commit f8097f0 Author: Stanislav A <[email protected]> Date: Wed Oct 12 18:36:11 2022 +0300 fix examples in description commit 991d55d Author: Stanislav A <[email protected]> Date: Tue Oct 11 20:17:37 2022 +0300 redo cookie parsing and matching, update tests commit ae82d2d Author: Stanislav A <[email protected]> Date: Mon Oct 10 15:59:49 2022 +0300 fix throttle and delay arg in tests commit 6913717 Author: Stanislav A <[email protected]> Date: Mon Oct 10 14:53:08 2022 +0300 improve localStorage matching commit f26ca3e Author: Stanislav A <[email protected]> Date: Mon Oct 10 14:28:39 2022 +0300 fix broken comment commit 339b002 Author: Stanislav A <[email protected]> Date: Mon Oct 10 14:27:54 2022 +0300 fix temiout var name commit 3c61def Author: Stanislav A <[email protected]> Date: Mon Oct 10 14:25:07 2022 +0300 add throttle commit a721c37 Author: Stanislav A <[email protected]> Date: Fri Oct 7 20:08:25 2022 +0300 add more comments on logic & fix observer pre-timeout disconnect condition commit 04e1d2e Author: Stanislav A <[email protected]> Date: Fri Oct 7 19:31:31 2022 +0300 improve elementStruct usage commit ade2862 Author: Stanislav A <[email protected]> Date: Fri Oct 7 19:21:20 2022 +0300 improve delay arg commit bb06036 Author: Stanislav A <[email protected]> Date: Fri Oct 7 18:38:30 2022 +0300 improve comments commit 19b4903 Author: Stanislav A <[email protected]> Date: Fri Oct 7 18:22:37 2022 +0300 improve description & add common delimiter commit a98f115 Author: Stanislav A <[email protected]> Date: Thu Oct 6 18:04:20 2022 +0300 guard selectors arg commit 26dab5c Author: Stanislav A <[email protected]> Date: Thu Oct 6 15:50:38 2022 +0300 log on invalid delay commit 37442d2 Author: Stanislav A <[email protected]> Date: Thu Oct 6 15:43:54 2022 +0300 add localStorage tests ... and 17 more commits ... and 21 more commits
Response.type
- Improveprevent-xhr
— blob response, randomized responseText with given length #206 (comment) (first part of the comment):
in URL - Improveprevent-fetch
— return original url in response #216 (comment)At the moment, if
prevent-fetch
is used thenResponse.url
returns empty string, but sometimes websites are checkingResponse.url
to detect ad blockers.Steps to reproduce
Alert is displayed because
getAds.url
returns''
, if request is not blocked then video player should be loaded.What if would add
fetchData.url
as another argument in:Scriptlets/src/scriptlets/prevent-fetch.js
Line 133 in 2a72d26
something like:
and add
Object.defineProperty(response, 'url', { value: url, writable: false });
to:Scriptlets/src/helpers/noop.js
Lines 59 to 70 in af1d5ad
For example:
It should causes that original url will be returned.
The text was updated successfully, but these errors were encountered: