AdguardTeam / AdguardTeam/AdGuardHome

Unable to add local file as a list

Aberta
#2,366 1 comentário 0 reações 0 responsáveis Ver no GitHub
feature request P4: Low
Linguagem predominante
TypeScript
Estrelas
36.9k
Forks
2.5k
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

### Prerequisites

Please answer the following questions for yourself before submitting an issue. **YOU MAY DELETE THE PREREQUISITES SECTION.**

- [x] I am running the latest version
- [x] I checked the documentation and found no answer
- [x] I checked to make sure that this issue has not already been filed

### Issue Details

* **Version of AdGuard Home server:** `0.104.3`
* **How did you setup DNS configuration:** IoT
* **If it's a router or IoT, please write device model:** `Raspberry Pi 3 Model B`
* **Operating system and version:** `Raspbian GNU/Linux 10 (buster)`

### Expected Behavior
Create a block list in any location (in this case `/tmp/block-my-hosts.txt`)
Add the file path through the UI using an absolute path
It should be accepted

### Actual Behavior
```
Error: control/filtering/add_url | Invalid URL or file path | 400
```

### Additional Information
The issue _seems_ to be [here](https://github.com/AdguardTeam/AdGuardHome/blob/c129361e55aea50c3454feca90025937261214ee/internal/home/control_filtering.go#L51-L54), however, looking at [`isValidUrl`](https://github.com/AdguardTeam/AdGuardHome/blob/c129361e55aea50c3454feca90025937261214ee/internal/home/control_filtering.go#L21), it seems the only thing that can go wrong is when the file does not exist, but I've confirmed the it definitely does:
```
$ ls -la /tmp/block-my-hosts.txt
-rw-r--r-- 1 adguardhome adguardhome 0 Nov 28 09:49 /tmp/block-my-hosts.txt
```

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.