Bug with forcing activation?
-
Hello, I can’t seem to force activation, even though the test emails work as well as checking the “Ignore sender email and force activation.”
Digging into the code real quick, I noticed a bug (at least I think it is). Looking at wp-ses/wp-ses.php on line 165 starts the following:
if (1 == $_POST['force']) { // bad hack to force plugin activation with IAM credentials $wpses_options['sender_ok'] == 1; $wpses_options['force'] = 1; wpses_log('Forced activation'); }
One of the bugs seems to be with the
$wpses_options['sender_ok'] == 1;
statement, as it should only be a single equals$wpses_options['sender_ok'] = 1;
Simply changing this does not seem to do the trick, it seems you also need to set either
$wpses_options['credentials_ok']
to 1 (which would then make the following if statement on line 170 true) or$wpses_options['active']
to 1I opted for setting ‘active’ to 1 as that seems to be the desired functionality. So the block starting at line 165 now looks like this:
if (1 == $_POST['force']) { // bad hack to force plugin activation with IAM credentials $wpses_options['sender_ok'] = 1; $wpses_options['force'] = 1; $wpses_options['active'] = 1; wpses_log('Forced activation'); }
This happens in other WordPress versions as well.
- The topic ‘Bug with forcing activation?’ is closed to new replies.