Opened 12 years ago
Last modified 4 years ago
#30959 new defect (bug)
race condition in wp_insert_user()
| Reported by: | hanelyp | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Users | Version: | 4.1 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
Description
Possibility exists for a user record insert between check if a user name already exists and actual database insert. A unique index on wp_users.user_login would prevent this, and allow the code to operate without a separate database query to check for an existing user.
Change History (7)
#5
@
4 years ago
It sounds like adding a `UNIQUE` constraint may not be possible for Core.
r36654 added an index, which should mitigate race conditions to some degree. Not entirely, though, since there's a newer report in #54071.
This ticket was mentioned in Slack in #core by ughimire1. View the logs.
4 years ago
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Related (and possible solution): #33376