mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-20 19:56:49 +01:00
Fix: Prevent registration bypass when user registration is disabled
This commit is contained in:
parent
5b8a20d134
commit
b222e6399b
|
|
@ -11,6 +11,11 @@
|
|||
/** Make sure that the WordPress bootstrap has run before continuing. */
|
||||
require __DIR__ . '/wp-load.php';
|
||||
|
||||
// 🔴 Security Fix: Prevent user registration if "Anyone can register" is disabled
|
||||
if (isset($_GET['action']) && $_GET['action'] === 'register' && !get_option('users_can_register')) {
|
||||
wp_die('Inscription désactivée.', 'Erreur', array('response' => 403));
|
||||
}
|
||||
|
||||
// Redirect to HTTPS login if forced to use SSL.
|
||||
if ( force_ssl_admin() && ! is_ssl() ) {
|
||||
if ( str_starts_with( $_SERVER['REQUEST_URI'], 'http' ) ) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user