# Authentication

### Criando Usuário Admin

Ao realizar um cadastro, digite no login `admin` (coloque os espaços no início e no final). Quando enviar sua requisição para o banco de dados, o final do login será cortado. Por exemplo, vamos supor que a coluna login só pode ter 20 caracteres, então os últimos espaços vão ser removidos. Caso algum trecho do código não valide algo como `$user = trim($login)`, você irá ter acessos administrativos, pois no banco, `admin` é diferente de `admin`     , mas na aplicação web, não.

Outra maneira, é colocarmos as letras diferenciando entre maiúsculas e minúsculas, por exemplo, podemos criar um usuário chamdo `AdMiN`.


---

# Agent Instructions: 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:

```
GET https://mysther.gitbook.io/knowledge-base/ataques/web-exploitation/authentication.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
