Make WordPress Core

Opened 8 years ago

Last modified 3 years ago

#11903 accepted defect (bug)

insert_with_markers is not threadsafe — at Initial Version

Reported by: strings28 Owned by: ryan
Milestone: Future Release Priority: normal
Severity: major Version: 2.9
Component: Permalinks Keywords: has-patch needs-refresh
Focuses: Cc:


From wp-admin/includes/misc.php the function insert_with_markers may be called multiple times on a busy server and if the htaccess is already in the process of being written it is possible that two PHP threads could attempt to write to it causing corruption such as the following:

# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule>

# END WordPress s

Notice the dangling 's' at the last line

Change History (1)

8 years ago

A proposed patch which creates a lock file

Note: See TracTickets for help on using tickets.