AdguardTeam / AdguardTeam/AdguardBrowserExtension

`$redirect` modifier does not fake `Response.prototype.url`

Abierto
#2,278 4 comentarios 2 reacciones 1 asignado Reclamado por @maximtop Ver en GitHub
Bug Firefox Priority: P4
Lenguaje dominante
TypeScript
Estrellas
4.4k
Forks
449
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

### AdGuard Extension version

4.1.53

### Browser version

Mozilla Firefox Developer Edition 110.0b6; Brave 1.47.186

### OS version

Ubuntu 22.10

### What filters do you have enabled?

AdGuard Base filter, AdGuard German filter, AdGuard Tracking Protection filter, AdGuard URL Tracking filter, List-KR

### What Stealth Mode options do you have enabled?

_No response_

### Issue Details

`Response.prototype.url` returns `(Browser Extension)://(UUID)/web-accessible-resources/redirects/googlesyndication-adsbygoogle.js?secret=...` if `||pagead2.googlesyndication.com/pagead/js/adsbygoogle.js$redirect=googlesyndication-adsbygoogle` rule is applied.

A website can profile a visitor with the browser extension's UUID.
uBlock Origin 1.46.0 is not affected by this issue.

### Expected Behavior

`Response.prototype.url` returns `https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js`.

### Screenshots

_No response_

### Additional Information

- https://listauthorschat.slack.com/archives/C010PK19W78/p1674828913893099
- https://github.com/uBlockOrigin/uAssets/issues/16430#issuecomment-1406557590
```javascript
async function detectAdblock() {
try{
var googlead = 'https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js';
var response = await fetch(googlead);
var result = await response.text();
if (result.length < 1000) {
console.log("Adblock detected! response length is " + result.length + " but it should be larger than 1.000" );
}
if (response.url != googlead) {
console.log("Adblock detected! response URL is " + response.url + " but it should be " + googlead);
}
}catch(e){
console.log("Adblock detected! The request got blocked");
}finally{
// Unbreak the site when the script got executed
}
}
detectAdblock();
```
The above test code is provided by @JobcenterTycoon.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.