HelloZeroNet / HelloZeroNet/ZeroNet

Zeronet UI does not work without HTTP Accept header

Ouverte
#1,346 3 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
JavaScript
Étoiles
18.8k
Forks
2.3k
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

### Step 1: Please describe your environment

* ZeroNet version: 0.6.2
* Operating system: Linux
* Web browser: Firefox
* Tor status: enabled
* Opened port: yes
* Special configuration: I2P Tunnel

### Step 2: Describe the problem:

Zeronet Ui expects HTTP `Accept` header to contain at least `text/html`. I2P tunnels remove `Accept` header from the request, which does not allow to access Zeronet due to the following check:
https://github.com/HelloZeroNet/ZeroNet/blob/master/src/Ui/UiRequest.py#L283

#### Steps to reproduce:

1. Send HTTP request without `Accept` HTTP header to Zeronet UI address

#### Observed Results:

Zeronet returns HTTP 403 `Invalid Accept header to load wrapper` error.

#### Expected Results:

Zeronet ignores absence of HTTP `Accept` header and continue to work.

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

Start at src/Ui/UiRequest.py around line 283 and reproduce the issue by sending an HTTP request without an Accept header to the ZeroNet UI address. Verify that the request no longer returns HTTP 403 and that the UI remains accessible when the header is absent.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
python
Domaine
backend
Type d'issue
Bug
Difficulté
2/5
Temps estimé
1-3 heures
Activité
À l'abandon
Clarté
Clairement spécifiée
Accessibilité débutants
45/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.