# Testing for Weak or Unenforced Username Policy (WSTG-IDNT-05)

| ID           |
| ------------ |
| WSTG-IDNT-05 |

## Summary

User account names are often highly structured (e.g. Joe Bloggs account name is jbloggs and Fred Nurks account name is fnurks) and valid account names can easily be guessed.

## Test Objectives

* Determine whether a consistent account name structure renders the application vulnerable to account enumeration.
* Determine whether the application's error messages permit account enumeration.

## How to Test

* Determine the structure of account names.
* Evaluate the application's response to valid and invalid account names.
* Use different responses to valid and invalid account names to enumerate valid account names.
* Use account name dictionaries to enumerate valid account names.

## Remediation

Ensure the application returns consistent generic error messages in response to invalid account name, password or other user credentials entered during the log in process.


---

# 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://owasp.boireau.io/4-web_application_security_testing/03-identity_management_testing/05-testing_for_weak_or_unenforced_username_policy.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.
