Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error when Email Subscribers plugin attempts to send email to a user with their S/MIME certificate #21

Closed
fabacab opened this issue May 28, 2017 · 2 comments
Labels

Comments

@fabacab
Copy link
Owner

fabacab commented May 28, 2017

Via https://wordpress.org/support/topic/accept-also-smime-keys/page/2/#post-9174319:

I have tested the “Email Subscribers & Newsletters” and is giving me a error when sending “Newsletters”.

Fatal error: Uncaught exception ‘Error’ with message ‘Length must be greater than 0’ in /www/blog/wp-includes/random_compat/random_bytes_dev_urandom.php:93 Stack trace: #0 /www/blog/wp-content/plugins/wp-pgp-encrypted-emails/includes/class-wp-smime.php(139): random_bytes(0) #1 [internal function]: WP_SMIME::encrypt(‘<strong style=”…’, ‘From: “Admin” <…’, Resource id #297) #2 /www/blog/wp-includes/class-wp-hook.php(298): call_user_func_array(Array, Array) #3 /www/blog/wp-includes/plugin.php(203): WP_Hook->apply_filters(‘<strong style=”…’, Array) #4 /www/blog/wp-content/plugins/wp-pgp-encrypted-emails/wp-pgp-encrypted-emails.php(1340): apply_filters(‘smime_encrypt’, ‘<strong style=”…’, ‘From: “Admin” <…’, Resource id #297) #5 /www/blog/wp-content/plugins/ in /www/blog/wp-includes/random_compat/random_bytes_dev_urandom.php on line 93

The e-mail to the webmaster e-mail is send encrypted, the e-mail to the user without S/MIME key is send properly, the e-mail send to the user with S/MIME key set up is not sent.

The same happens when publishing a normal article of the wordpress… and I really mean, I do a normal article on wordpress, but when I publish it to the web site I received the error bellow:

Fatal error: Uncaught exception ‘Error’ with message ‘Length must be greater than 0’ in /www/blog/wp-includes/random_compat/random_bytes_dev_urandom.php:93 Stack trace: #0 /www/blog/wp-content/plugins/wp-pgp-encrypted-emails/includes/class-wp-smime.php(139): random_bytes(0) #1 [internal function]: WP_SMIME::encrypt(‘Hello Carina,<b…’, ‘From: “Admin” <…’, Resource id #295) #2 /www/blog/wp-includes/class-wp-hook.php(298): call_user_func_array(Array, Array) #3 /www/blog/wp-includes/plugin.php(203): WP_Hook->apply_filters(‘Hello Carina,<b…’, Array) #4 /www/blog/wp-content/plugins/wp-pgp-encrypted-emails/wp-pgp-encrypted-emails.php(1340): apply_filters(‘smime_encrypt’, ‘Hello Carina,<b…’, ‘From: “Admin” <…’, Resource id #295) #5 /www/blog/wp-content/plugins/ in /www/blog/wp-includes/random_compat/random_bytes_dev_urandom.php on line 93

“Hello Carina” is probably referring in this case of the user with S/MIME set up on its account.
The other e-mails are sent correctly (encrypted to the admin e-mail, and to the none set up S/MIME user).

And yes the article is published correctly on the web site.

This happens if “Email Subscribers & Newsletters” is active… without it the e-mail notifications can’t be send of course. Disabling the “WP PGP Encrypted Emails” makes it work properly without errors.

@fabacab fabacab added the bug label May 28, 2017
@fabacab
Copy link
Owner Author

fabacab commented May 28, 2017

I cannot confirm this behavior. Awaiting feedback from the reporter.

@fabacab
Copy link
Owner Author

fabacab commented Jul 27, 2017

No feedback from the reporter, so this issue is considered resolved.

@fabacab fabacab closed this as completed Jul 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant