> For the complete documentation index, see [llms.txt](https://hacking-notes.jord4n.pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hacking-notes.jord4n.pro/fr/web/access-control/password-filtering-via-parameter-controlled-id.md).

# Filtrage du mot de passe via un identifiant contrôlé par paramètre

### ID utilisateur contrôlé par un paramètre de requête avec divulgation du mot de passe

Ce laboratoire dispose d'une page de profil utilisateur dans laquelle le mot de passe actuel apparaît dans un champ prérempli, mais masqué par un champ de saisie de mot de passe. / L'identifiant utilisateur est contrôlé via un paramètre dans l'URL, ce qui permet d'accéder arbitrairement au profil d'autres comptes.

Le but est de récupérer le mot de passe de l'administrateur, puis de l'utiliser pour supprimer l'utilisateur carlos.

#### **Procédure terminée**

* La modification du paramètre de l'URL peut afficher le profil d'un autre utilisateur :

```bash
/my-account?id=administrator
```

* La page charge correctement les données du compte administrateur, mais le mot de passe apparaît masqué ( type="password" ).
* Modifier le type du champ dans le code HTML côté client en :

<figure><img src="/files/3f3fbc3ff9a23269d3f7ce75d65c245a784b9bd3" alt="" width="563"><figcaption></figcaption></figure>

Ainsi, il est possible de récupérer le mot de passe de l'administrateur et de s'y connecter pour supprimer l'utilisateur carlos depuis l'interface d'administration.

* le mot de passe devient visible en clair.

<figure><img src="/files/7b3e49c12d2d605994228ae2a4dff18b238fe772" alt="" width="563"><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://hacking-notes.jord4n.pro/fr/web/access-control/password-filtering-via-parameter-controlled-id.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
