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

PHP 7 Deprecated Function: mcrypt_list_algorithms() #340

Open
renzms opened this issue Jun 8, 2017 · 4 comments
Open

PHP 7 Deprecated Function: mcrypt_list_algorithms() #340

renzms opened this issue Jun 8, 2017 · 4 comments

Comments

@renzms
Copy link
Contributor

renzms commented Jun 8, 2017

When testing with WordPress v4.8 and Comment Mail Lite/ Pro an error prompt occurs only when WP_DEBUG was enabled for both Comment Mail Lite/Pro versions. When clicking the confirmation link from the Confirmation Subscription Email, you are redirected to a page with - Deprecated: Function mcrypt_list_algorithms():

Comment Mail Lite Version 161213 Test || with WP_DEBUG enabled

Results with WP_DEBUG enabled
  • Error Prompt -- When Confirming Subscription

Deprecated: Function mcrypt_list_algorithms()

Deprecated: Function mcrypt_list_algorithms() is deprecated in /app/src/wp-content/plugins/comment-mail/src/includes/classes/UtilsEnc.php on line 124 Call Stack: 0.0001 385400 1. {main}() /app/src/index.php:0 0.0002 385688 2. require('/app/src/wp-blog-header.php') /app/src/index.php:17 0.0002 386040 3. require_once('/app/src/wp-load.php') /app/src/wp-blog-header.php:13 0.0002 386784 4. require_once('/app/src/wp-config.php') /app/src/wp-load.php:37 0.0003 388400 5. require_once('/app/src/wp-settings.php') /app/src/wp-config.php:43 0.0209 2655136 6. do_action() /app/src/wp-settings.php:448 0.0209 2656152 7. WP_Hook->do_action() /app/src/wp-includes/plugin.php:453 0.0209 2656152 8. WP_Hook->apply_filters() /app/src/wp-includes/class-wp-hook.php:323 0.0209 2657576 9. WebSharks\CommentMail\Plugin->actions() /app/src/wp-includes/class-wp-hook.php:298 0.0211 2668168 10. WebSharks\CommentMail\Actions->__construct() /app/src/wp-content/plugins/comment-mail/src/includes/classes/Plugin.php:1035 0.0211 2668232 11. WebSharks\CommentMail\Actions->maybeDoSubActions() /app/src/wp-content/plugins/comment-mail/src/includes/classes/Actions.php:37 0.0214 2713840 12. WebSharks\CommentMail\SubActions->__construct() /app/src/wp-content/plugins/comment-mail/src/includes/classes/Actions.php:57 0.0214 2713904 13. WebSharks\CommentMail\SubActions->maybeHandle() /app/src/wp-content/plugins/comment-mail/src/includes/classes/SubActions.php:42 0.0215 2717928 14. WebSharks\CommentMail\SubActions->confirm() /app/src/wp-content/plugins/comment-mail/src/includes/classes/SubActions.php:63 0.0230 2721136 15. WebSharks\CommentMail\UtilsSub->setCurrentEmail() /app/src/wp-content/plugins/comment-mail/src/includes/classes/SubActions.php:102 0.0235 2789928 16. WebSharks\CommentMail\UtilsEnc->setCookie() /app/src/wp-content/plugins/comment-mail/src/includes/classes/UtilsSub.php:1174 0.0235 2789928 17. WebSharks\CommentMail\UtilsEnc->encrypt() /app/src/wp-content/plugins/comment-mail/src/includes/classes/UtilsEnc.php:392 Deprecated: Function mcrypt_list_modes() is deprecated in /app/src/wp-content/plugins/comment-mail/src/includes/classes/UtilsEnc.php on line 125 Call Stack: 0.0001 385400 1. {main}() /app/src/index.php:0 0.0002 385688 2. require('/app/src/wp-blog-header.php') /app/src/index.php:17 0.0002 386040 3. require_once('/app/src/wp-load.php') /app/src/wp-blog-header.php:13 0.0002 386784 4. require_once('/app/src/wp-config.php') /app/src/wp-load.php:37 0.0003 388400 5. require_once('/app/src/wp-settings.php') /app/src/wp-config.php:43 0.0209 2655136 6. do_action() /app/src/wp-settings.php:448 0.0209 2656152 7. WP_Hook->do_action() /app/src/wp-includes/plugin.php:453 0.0209 2656152 8. WP_Hook->apply_filters() /app/src/wp-includes/class-wp-hook.php:323 0.0209 2657576 9. WebSharks\CommentMail\Plugin->actions() /app/src/wp-includes/class-wp-hook.php:298 0.0211 2668168 10. WebSharks\CommentMail\Actions->__construct() /app/src/wp-content/plugins/comment-mail/src/includes/classes/Plugin.php:1035 0.0211 2668232 11. WebSharks\CommentMail\Actions->maybeDoSubActions() /app/src/wp-content/plugins/comment-mail/src/includes/classes/Actions.php:37 0.0214 2713840 12. WebSharks\CommentMail\SubActions->__construct() /app/src/wp-content/plugins/comment-mail/src/includes/classes/Actions.php:57 0.0214 2713904 13. WebSharks\CommentMail\SubActions->maybeHandle() /app/src/wp-content/plugins/comment-mail/src/includes/classes/SubActions.php:42 0.0215 2717928 14. WebSharks\CommentMail\SubActions->confirm() /app/src/wp-content/plugins/comment-mail/src/includes/classes/SubActions.php:63 0.0230 2721136 15. WebSharks\CommentMail\UtilsSub->setCurrentEmail() /app/src/wp-content/plugins/comment-mail/src/includes/classes/SubActions.php:102 0.0235 2789928 16. WebSharks\CommentMail\UtilsEnc->setCookie() /app/src/wp-content/plugins/comment-mail/src/includes/classes/UtilsSub.php:1174 0.0235 2789928 17. WebSharks\CommentMail\UtilsEnc->encrypt() /app/src/wp-content/plugins/comment-mail/src/includes/classes/UtilsEnc.php:392 Deprecated: Function mcrypt_get_key_size() is deprecated in /app/src/wp-content/plugins/comment-mail/src/includes/classes/UtilsEnc.php on line 130 Call Stack: 0.0001 385400 1. {main}() /app/src/index.php:0 0.0002 385688 2. require('/app/src/wp-blog-header.php') /app/src/index.php:17 0.0002 386040 3. require_once('/app/src/wp-load.php') /app/src/wp-blog-header.php:13 0.0002 386784 4. require_once('/app/src/wp-config.php') /app/src/wp-load.php:37 0.0003 388400 5. require_once('/app/src/wp-settings.php') /app/src/wp-config.php:43 0.0209 2655136 6. do_action() /app/src/wp-settings.php:448 0.0209 2656152 7. WP_Hook->do_action() /app/src/wp-includes/plugin.php:453 0.0209 2656152 8. WP_Hook->apply_filters() /app/src/wp-includes/class-wp-hook.php:323 0.0209 2657576 9. WebSharks\CommentMail\Plugin->actions() /app/src/wp-includes/class-wp-hook.php:298 0.0211 2668168 10. WebSharks\CommentMail\Actions->__construct() /app/src/wp-content/plugins/comment-mail/src/includes/classes/Plugin.php:1035 0.0211 2668232 11. WebSharks\CommentMail\Actions->maybeDoSubActions() /app/src/wp-content/plugins/comment-mail/src/includes/classes/Actions.php:37 0.0214 2713840 12. WebSharks\CommentMail\SubActions->__construct() /app/src/wp-content/plugins/comment-mail/src/includes/classes/Actions.php:57 0.0214 2713904 13. WebSharks\CommentMail\SubActions->maybeHandle() /app/src/wp-content/plugins/comment-mail/src/includes/classes/SubActions.php:42 0.0215 2717928 14. WebSharks\CommentMail\SubActions->confirm() /app/src/wp-content/plugins/comment-mail/src/includes/classes/SubActions.php:63 0.0230 2721136 15. WebSharks\CommentMail\UtilsSub->setCurrentEmail() /app/src/wp-content/plugins/comment-mail/src/includes/classes/SubActions.php:102 0.0235 2789928 16. WebSharks\CommentMail\UtilsEnc->setCookie() /app/src/wp-content/plugins/comment-mail/src/includes/classes/UtilsSub.php:1174 0.0235 2789928 17. WebSharks\CommentMail\UtilsEnc->encrypt() /app/src/wp-content/plugins/comment-mail/src/includes/classes/UtilsEnc.php:392 Deprecated: Function mcrypt_get_iv_size() is deprecated in /app/src/wp-content/plugins/comment-mail/src/includes/classes/UtilsEnc.php on line 131 Call Stack: 0.0001 385400 1. {main}() /app/src/index.php:0 0.0002 385688 2. require('/app/src/wp-blog-header.php') /app/src/index.php:17 0.0002 386040 3. require_once('/app/src/wp-load.php') /app/src/wp-blog-header.php:13 0.0002 386784 4. require_once('/app/src/wp-config.php') /app/src/wp-load.php:37 0.0003 388400 5. require_once('/app/src/wp-settings.php') /app/src/wp-config.php:43 0.0209 2655136 6. do_action() /app/src/wp-settings.php:448 0.0209 2656152 7. WP_Hook->do_action() /app/src/wp-includes/plugin.php:453 0.0209 2656152 8. WP_Hook->apply_filters() /app/src/wp-includes/class-wp-hook.php:323 0.0209 2657576 9. WebSharks\CommentMail\Plugin->actions() /app/src/wp-includes/class-wp-hook.php:298 0.0211 2668168 10. WebSharks\CommentMail\Actions->__construct() /app/src/wp-content/plugins/comment-mail/src/includes/classes/Plugin.php:1035 0.0211 2668232 11. WebSharks\CommentMail\Actions->maybeDoSubActions() /app/src/wp-content/plugins/comment-mail/src/includes/classes/Actions.php:37 0.0214 2713840 12. WebSharks\CommentMail\SubActions->__construct() /app/src/wp-content/plugins/comment-mail/src/includes/classes/Actions.php:57 0.0214 2713904 13. WebSharks\CommentMail\SubActions->maybeHandle() /app/src/wp-content/plugins/comment-mail/src/includes/classes/SubActions.php:42 0.0215 2717928 14. WebSharks\CommentMail\SubActions->confirm() /app/src/wp-content/plugins/comment-mail/src/includes/classes/SubActions.php:63 0.0230 2721136 15. WebSharks\CommentMail\UtilsSub->setCurrentEmail() /app/src/wp-content/plugins/comment-mail/src/includes/classes/SubActions.php:102 0.0235 2789928 16. WebSharks\CommentMail\UtilsEnc->setCookie() /app/src/wp-content/plugins/comment-mail/src/includes/classes/UtilsSub.php:1174 0.0235 2789928 17. WebSharks\CommentMail\UtilsEnc->encrypt() /app/src/wp-content/plugins/comment-mail/src/includes/classes/UtilsEnc.php:392 Deprecated: Function mcrypt_encrypt() is deprecated in /app/src/wp-content/plugins/comment-mail/src/includes/classes/UtilsEnc.php on line 133 Call Stack: 0.0001 385400 1. {main}() /app/src/index.php:0 0.0002 385688 2. require('/app/src/wp-blog-header.php') /app/src/index.php:17 0.0002 386040 3. require_once('/app/src/wp-load.php') /app/src/wp-blog-header.php:13 0.0002 386784 4. require_once('/app/src/wp-config.php') /app/src/wp-load.php:37 0.0003 388400 5. require_once('/app/src/wp-settings.php') /app/src/wp-config.php:43 0.0209 2655136 6. do_action() /app/src/wp-settings.php:448 0.0209 2656152 7. WP_Hook->do_action() /app/src/wp-includes/plugin.php:453 0.0209 2656152 8. WP_Hook->apply_filters() /app/src/wp-includes/class-wp-hook.php:323 0.0209 2657576 9. WebSharks\CommentMail\Plugin->actions() /app/src/wp-includes/class-wp-hook.php:298 0.0211 2668168 10. WebSharks\CommentMail\Actions->__construct() /app/src/wp-content/plugins/comment-mail/src/includes/classes/Plugin.php:1035 0.0211 2668232 11. WebSharks\CommentMail\Actions->maybeDoSubActions() /app/src/wp-content/plugins/comment-mail/src/includes/classes/Actions.php:37 0.0214 2713840 12. WebSharks\CommentMail\SubActions->__construct() /app/src/wp-content/plugins/comment-mail/src/includes/classes/Actions.php:57 0.0214 2713904 13. WebSharks\CommentMail\SubActions->maybeHandle() /app/src/wp-content/plugins/comment-mail/src/includes/classes/SubActions.php:42 0.0215 2717928 14. WebSharks\CommentMail\SubActions->confirm() /app/src/wp-content/plugins/comment-mail/src/includes/classes/SubActions.php:63 0.0230 2721136 15. WebSharks\CommentMail\UtilsSub->setCurrentEmail() /app/src/wp-content/plugins/comment-mail/src/includes/classes/SubActions.php:102 0.0235 2789928 16. WebSharks\CommentMail\UtilsEnc->setCookie() /app/src/wp-content/plugins/comment-mail/src/includes/classes/UtilsSub.php:1174 0.0235 2789928 17. WebSharks\CommentMail\UtilsEnc->encrypt() /app/src/wp-content/plugins/comment-mail/src/includes/classes/UtilsEnc.php:392 Fatal error: Uncaught Exception: Doing it wrong! Headers have already been sent. in /app/src/wp-content/plugins/comment-mail/src/includes/classes/UtilsEnc.php on line 396 Exception: Doing it wrong! Headers have already been sent. in /app/src/wp-content/plugins/comment-mail/src/includes/classes/UtilsEnc.php on line 396 Call Stack: 0.0001 385400 1. {main}() /app/src/index.php:0 0.0002 385688 2. require('/app/src/wp-blog-header.php') /app/src/index.php:17 0.0002 386040 3. require_once('/app/src/wp-load.php') /app/src/wp-blog-header.php:13 0.0002 386784 4. require_once('/app/src/wp-config.php') /app/src/wp-load.php:37 0.0003 388400 5. require_once('/app/src/wp-settings.php') /app/src/wp-config.php:43 0.0209 2655136 6. do_action() /app/src/wp-settings.php:448 0.0209 2656152 7. WP_Hook->do_action() /app/src/wp-includes/plugin.php:453 0.0209 2656152 8. WP_Hook->apply_filters() /app/src/wp-includes/class-wp-hook.php:323 0.0209 2657576 9. WebSharks\CommentMail\Plugin->actions() /app/src/wp-includes/class-wp-hook.php:298 0.0211 2668168 10. WebSharks\CommentMail\Actions->__construct() /app/src/wp-content/plugins/comment-mail/src/includes/classes/Plugin.php:1035 0.0211 2668232 11. WebSharks\CommentMail\Actions->maybeDoSubActions() /app/src/wp-content/plugins/comment-mail/src/includes/classes/Actions.php:37 0.0214 2713840 12. WebSharks\CommentMail\SubActions->__construct() /app/src/wp-content/plugins/comment-mail/src/includes/classes/Actions.php:57 0.0214 2713904 13. WebSharks\CommentMail\SubActions->maybeHandle() /app/src/wp-content/plugins/comment-mail/src/includes/classes/SubActions.php:42 0.0215 2717928 14. WebSharks\CommentMail\SubActions->confirm() /app/src/wp-content/plugins/comment-mail/src/includes/classes/SubActions.php:63 0.0230 2721136 15. WebSharks\CommentMail\UtilsSub->setCurrentEmail() /app/src/wp-content/plugins/comment-mail/src/includes/classes/SubActions.php:102 0.0235 2789928 16. WebSharks\CommentMail\UtilsEnc->setCookie() /app/src/wp-content/plugins/comment-mail/src/includes/classes/UtilsSub.php:1174

Email Confirmation Link

Email Confirmation Link

Error Prompt after clicking Link

Error Prompt after clicking Link

Comment Mail Pro Version 161213 Test || with WP_DEBUG enabled

Results with WP_DEBUG enabled
  • Error Prompt -- When Confirming Subscription

Deprecated: Function mcrypt_list_algorithms():

Deprecated: Function mcrypt_list_algorithms() is deprecated in /app/src/wp-content/plugins/comment-mail/src/includes/classes/UtilsEnc.php on line 124 Call Stack: 0.0001 385400 1. {main}() /app/src/index.php:0 0.0002 385688 2. require('/app/src/wp-blog-header.php') /app/src/index.php:17 0.0002 386040 3. require_once('/app/src/wp-load.php') /app/src/wp-blog-header.php:13 0.0002 386784 4. require_once('/app/src/wp-config.php') /app/src/wp-load.php:37 0.0003 388400 5. require_once('/app/src/wp-settings.php') /app/src/wp-config.php:43 0.0209 2655136 6. do_action() /app/src/wp-settings.php:448 0.0209 2656152 7. WP_Hook->do_action() /app/src/wp-includes/plugin.php:453 0.0209 2656152 8. WP_Hook->apply_filters() /app/src/wp-includes/class-wp-hook.php:323 0.0209 2657576 9. WebSharks\CommentMail\Plugin->actions() /app/src/wp-includes/class-wp-hook.php:298 0.0211 2668168 10. WebSharks\CommentMail\Actions->__construct() /app/src/wp-content/plugins/comment-mail/src/includes/classes/Plugin.php:1035 0.0211 2668232 11. WebSharks\CommentMail\Actions->maybeDoSubActions() /app/src/wp-content/plugins/comment-mail/src/includes/classes/Actions.php:37 0.0214 2713840 12. WebSharks\CommentMail\SubActions->__construct() /app/src/wp-content/plugins/comment-mail/src/includes/classes/Actions.php:57 0.0214 2713904 13. WebSharks\CommentMail\SubActions->maybeHandle() /app/src/wp-content/plugins/comment-mail/src/includes/classes/SubActions.php:42 0.0215 2717928 14. WebSharks\CommentMail\SubActions->confirm() /app/src/wp-content/plugins/comment-mail/src/includes/classes/SubActions.php:63 0.0230 2721136 15. WebSharks\CommentMail\UtilsSub->setCurrentEmail() /app/src/wp-content/plugins/comment-mail/src/includes/classes/SubActions.php:102 0.0235 2789928 16. WebSharks\CommentMail\UtilsEnc->setCookie() /app/src/wp-content/plugins/comment-mail/src/includes/classes/UtilsSub.php:1174 0.0235 2789928 17. WebSharks\CommentMail\UtilsEnc->encrypt() /app/src/wp-content/plugins/comment-mail/src/includes/classes/UtilsEnc.php:392 Deprecated: Function mcrypt_list_modes() is deprecated in /app/src/wp-content/plugins/comment-mail/src/includes/classes/UtilsEnc.php on line 125 Call Stack: 0.0001 385400 1. {main}() /app/src/index.php:0 0.0002 385688 2. require('/app/src/wp-blog-header.php') /app/src/index.php:17 0.0002 386040 3. require_once('/app/src/wp-load.php') /app/src/wp-blog-header.php:13 0.0002 386784 4. require_once('/app/src/wp-config.php') /app/src/wp-load.php:37 0.0003 388400 5. require_once('/app/src/wp-settings.php') /app/src/wp-config.php:43 0.0209 2655136 6. do_action() /app/src/wp-settings.php:448 0.0209 2656152 7. WP_Hook->do_action() /app/src/wp-includes/plugin.php:453 0.0209 2656152 8. WP_Hook->apply_filters() /app/src/wp-includes/class-wp-hook.php:323 0.0209 2657576 9. WebSharks\CommentMail\Plugin->actions() /app/src/wp-includes/class-wp-hook.php:298 0.0211 2668168 10. WebSharks\CommentMail\Actions->__construct() /app/src/wp-content/plugins/comment-mail/src/includes/classes/Plugin.php:1035 0.0211 2668232 11. WebSharks\CommentMail\Actions->maybeDoSubActions() /app/src/wp-content/plugins/comment-mail/src/includes/classes/Actions.php:37 0.0214 2713840 12. WebSharks\CommentMail\SubActions->__construct() /app/src/wp-content/plugins/comment-mail/src/includes/classes/Actions.php:57 0.0214 2713904 13. WebSharks\CommentMail\SubActions->maybeHandle() /app/src/wp-content/plugins/comment-mail/src/includes/classes/SubActions.php:42 0.0215 2717928 14. WebSharks\CommentMail\SubActions->confirm() /app/src/wp-content/plugins/comment-mail/src/includes/classes/SubActions.php:63 0.0230 2721136 15. WebSharks\CommentMail\UtilsSub->setCurrentEmail() /app/src/wp-content/plugins/comment-mail/src/includes/classes/SubActions.php:102 0.0235 2789928 16. WebSharks\CommentMail\UtilsEnc->setCookie() /app/src/wp-content/plugins/comment-mail/src/includes/classes/UtilsSub.php:1174 0.0235 2789928 17. WebSharks\CommentMail\UtilsEnc->encrypt() /app/src/wp-content/plugins/comment-mail/src/includes/classes/UtilsEnc.php:392 Deprecated: Function mcrypt_get_key_size() is deprecated in /app/src/wp-content/plugins/comment-mail/src/includes/classes/UtilsEnc.php on line 130 Call Stack: 0.0001 385400 1. {main}() /app/src/index.php:0 0.0002 385688 2. require('/app/src/wp-blog-header.php') /app/src/index.php:17 0.0002 386040 3. require_once('/app/src/wp-load.php') /app/src/wp-blog-header.php:13 0.0002 386784 4. require_once('/app/src/wp-config.php') /app/src/wp-load.php:37 0.0003 388400 5. require_once('/app/src/wp-settings.php') /app/src/wp-config.php:43 0.0209 2655136 6. do_action() /app/src/wp-settings.php:448 0.0209 2656152 7. WP_Hook->do_action() /app/src/wp-includes/plugin.php:453 0.0209 2656152 8. WP_Hook->apply_filters() /app/src/wp-includes/class-wp-hook.php:323 0.0209 2657576 9. WebSharks\CommentMail\Plugin->actions() /app/src/wp-includes/class-wp-hook.php:298 0.0211 2668168 10. WebSharks\CommentMail\Actions->__construct() /app/src/wp-content/plugins/comment-mail/src/includes/classes/Plugin.php:1035 0.0211 2668232 11. WebSharks\CommentMail\Actions->maybeDoSubActions() /app/src/wp-content/plugins/comment-mail/src/includes/classes/Actions.php:37 0.0214 2713840 12. WebSharks\CommentMail\SubActions->__construct() /app/src/wp-content/plugins/comment-mail/src/includes/classes/Actions.php:57 0.0214 2713904 13. WebSharks\CommentMail\SubActions->maybeHandle() /app/src/wp-content/plugins/comment-mail/src/includes/classes/SubActions.php:42 0.0215 2717928 14. WebSharks\CommentMail\SubActions->confirm() /app/src/wp-content/plugins/comment-mail/src/includes/classes/SubActions.php:63 0.0230 2721136 15. WebSharks\CommentMail\UtilsSub->setCurrentEmail() /app/src/wp-content/plugins/comment-mail/src/includes/classes/SubActions.php:102 0.0235 2789928 16. WebSharks\CommentMail\UtilsEnc->setCookie() /app/src/wp-content/plugins/comment-mail/src/includes/classes/UtilsSub.php:1174 0.0235 2789928 17. WebSharks\CommentMail\UtilsEnc->encrypt() /app/src/wp-content/plugins/comment-mail/src/includes/classes/UtilsEnc.php:392 Deprecated: Function mcrypt_get_iv_size() is deprecated in /app/src/wp-content/plugins/comment-mail/src/includes/classes/UtilsEnc.php on line 131 Call Stack: 0.0001 385400 1. {main}() /app/src/index.php:0 0.0002 385688 2. require('/app/src/wp-blog-header.php') /app/src/index.php:17 0.0002 386040 3. require_once('/app/src/wp-load.php') /app/src/wp-blog-header.php:13 0.0002 386784 4. require_once('/app/src/wp-config.php') /app/src/wp-load.php:37 0.0003 388400 5. require_once('/app/src/wp-settings.php') /app/src/wp-config.php:43 0.0209 2655136 6. do_action() /app/src/wp-settings.php:448 0.0209 2656152 7. WP_Hook->do_action() /app/src/wp-includes/plugin.php:453 0.0209 2656152 8. WP_Hook->apply_filters() /app/src/wp-includes/class-wp-hook.php:323 0.0209 2657576 9. WebSharks\CommentMail\Plugin->actions() /app/src/wp-includes/class-wp-hook.php:298 0.0211 2668168 10. WebSharks\CommentMail\Actions->__construct() /app/src/wp-content/plugins/comment-mail/src/includes/classes/Plugin.php:1035 0.0211 2668232 11. WebSharks\CommentMail\Actions->maybeDoSubActions() /app/src/wp-content/plugins/comment-mail/src/includes/classes/Actions.php:37 0.0214 2713840 12. WebSharks\CommentMail\SubActions->__construct() /app/src/wp-content/plugins/comment-mail/src/includes/classes/Actions.php:57 0.0214 2713904 13. WebSharks\CommentMail\SubActions->maybeHandle() /app/src/wp-content/plugins/comment-mail/src/includes/classes/SubActions.php:42 0.0215 2717928 14. WebSharks\CommentMail\SubActions->confirm() /app/src/wp-content/plugins/comment-mail/src/includes/classes/SubActions.php:63 0.0230 2721136 15. WebSharks\CommentMail\UtilsSub->setCurrentEmail() /app/src/wp-content/plugins/comment-mail/src/includes/classes/SubActions.php:102 0.0235 2789928 16. WebSharks\CommentMail\UtilsEnc->setCookie() /app/src/wp-content/plugins/comment-mail/src/includes/classes/UtilsSub.php:1174 0.0235 2789928 17. WebSharks\CommentMail\UtilsEnc->encrypt() /app/src/wp-content/plugins/comment-mail/src/includes/classes/UtilsEnc.php:392 Deprecated: Function mcrypt_encrypt() is deprecated in /app/src/wp-content/plugins/comment-mail/src/includes/classes/UtilsEnc.php on line 133 Call Stack: 0.0001 385400 1. {main}() /app/src/index.php:0 0.0002 385688 2. require('/app/src/wp-blog-header.php') /app/src/index.php:17 0.0002 386040 3. require_once('/app/src/wp-load.php') /app/src/wp-blog-header.php:13 0.0002 386784 4. require_once('/app/src/wp-config.php') /app/src/wp-load.php:37 0.0003 388400 5. require_once('/app/src/wp-settings.php') /app/src/wp-config.php:43 0.0209 2655136 6. do_action() /app/src/wp-settings.php:448 0.0209 2656152 7. WP_Hook->do_action() /app/src/wp-includes/plugin.php:453 0.0209 2656152 8. WP_Hook->apply_filters() /app/src/wp-includes/class-wp-hook.php:323 0.0209 2657576 9. WebSharks\CommentMail\Plugin->actions() /app/src/wp-includes/class-wp-hook.php:298 0.0211 2668168 10. WebSharks\CommentMail\Actions->__construct() /app/src/wp-content/plugins/comment-mail/src/includes/classes/Plugin.php:1035 0.0211 2668232 11. WebSharks\CommentMail\Actions->maybeDoSubActions() /app/src/wp-content/plugins/comment-mail/src/includes/classes/Actions.php:37 0.0214 2713840 12. WebSharks\CommentMail\SubActions->__construct() /app/src/wp-content/plugins/comment-mail/src/includes/classes/Actions.php:57 0.0214 2713904 13. WebSharks\CommentMail\SubActions->maybeHandle() /app/src/wp-content/plugins/comment-mail/src/includes/classes/SubActions.php:42 0.0215 2717928 14. WebSharks\CommentMail\SubActions->confirm() /app/src/wp-content/plugins/comment-mail/src/includes/classes/SubActions.php:63 0.0230 2721136 15. WebSharks\CommentMail\UtilsSub->setCurrentEmail() /app/src/wp-content/plugins/comment-mail/src/includes/classes/SubActions.php:102 0.0235 2789928 16. WebSharks\CommentMail\UtilsEnc->setCookie() /app/src/wp-content/plugins/comment-mail/src/includes/classes/UtilsSub.php:1174 0.0235 2789928 17. WebSharks\CommentMail\UtilsEnc->encrypt() /app/src/wp-content/plugins/comment-mail/src/includes/classes/UtilsEnc.php:392 Fatal error: Uncaught Exception: Doing it wrong! Headers have already been sent. in /app/src/wp-content/plugins/comment-mail/src/includes/classes/UtilsEnc.php on line 396 Exception: Doing it wrong! Headers have already been sent. in /app/src/wp-content/plugins/comment-mail/src/includes/classes/UtilsEnc.php on line 396 Call Stack: 0.0001 385400 1. {main}() /app/src/index.php:0 0.0002 385688 2. require('/app/src/wp-blog-header.php') /app/src/index.php:17 0.0002 386040 3. require_once('/app/src/wp-load.php') /app/src/wp-blog-header.php:13 0.0002 386784 4. require_once('/app/src/wp-config.php') /app/src/wp-load.php:37 0.0003 388400 5. require_once('/app/src/wp-settings.php') /app/src/wp-config.php:43 0.0209 2655136 6. do_action() /app/src/wp-settings.php:448 0.0209 2656152 7. WP_Hook->do_action() /app/src/wp-includes/plugin.php:453 0.0209 2656152 8. WP_Hook->apply_filters() /app/src/wp-includes/class-wp-hook.php:323 0.0209 2657576 9. WebSharks\CommentMail\Plugin->actions() /app/src/wp-includes/class-wp-hook.php:298 0.0211 2668168 10. WebSharks\CommentMail\Actions->__construct() /app/src/wp-content/plugins/comment-mail/src/includes/classes/Plugin.php:1035 0.0211 2668232 11. WebSharks\CommentMail\Actions->maybeDoSubActions() /app/src/wp-content/plugins/comment-mail/src/includes/classes/Actions.php:37 0.0214 2713840 12. WebSharks\CommentMail\SubActions->__construct() /app/src/wp-content/plugins/comment-mail/src/includes/classes/Actions.php:57 0.0214 2713904 13. WebSharks\CommentMail\SubActions->maybeHandle() /app/src/wp-content/plugins/comment-mail/src/includes/classes/SubActions.php:42 0.0215 2717928 14. WebSharks\CommentMail\SubActions->confirm() /app/src/wp-content/plugins/comment-mail/src/includes/classes/SubActions.php:63 0.0230 2721136 15. WebSharks\CommentMail\UtilsSub->setCurrentEmail() /app/src/wp-content/plugins/comment-mail/src/includes/classes/SubActions.php:102 0.0235 2789928 16. WebSharks\CommentMail\UtilsEnc->setCookie() /app/src/wp-content/plugins/comment-mail/src/includes/classes/UtilsSub.php:1174

Email Confirmation Link

Email Confirmation Link

Error Prompt after clicking Link

Error Prompt after clicking Link



These lines in the source code are where this function is used:

here and here

@raamdev
Copy link
Contributor

raamdev commented Jun 9, 2017

It looks like defuse and RNCryptor are two alternatives that have replaced mcrypt, which has been abandonware for nearly a decade now. Mcrypt has been deprecated and will be removed from the core and in PECL in PHP 7.2.

@raamdev raamdev changed the title WordPress v4.8 Deprecated: Function mcrypt_list_algorithms(): PHP 7 Deprecated Function: mcrypt_list_algorithms(): Jun 9, 2017
@raamdev raamdev changed the title PHP 7 Deprecated Function: mcrypt_list_algorithms(): PHP 7 Deprecated Function: mcrypt_list_algorithms() Jun 9, 2017
@jaswrks
Copy link

jaswrks commented Jun 9, 2017

I've worked with Defuse recently and there is an example here if it helps.
https://github.com/websharks/s2member/blob/dev/src/includes/classes/utils-defuse.inc.php

@jaswrks
Copy link

jaswrks commented Jun 9, 2017

The trickiest part about Defuse is that it requires a Defuse-generated key that needs to be stored in the WP database once it is generated for a site; i.e., you can't just use any random string or wp_salt(). It requires a special key only Defuse can generate.

@jaswrks
Copy link

jaswrks commented Jun 9, 2017

Generating the key.

use Defuse\Crypto\Key;
$key = Key::createNewRandomKey()->saveToAsciiSafeString();

Saving it in the DB.

update_option('defuse_key', $key);

Reading, unpacking the key.

$key = Key::loadFromAsciiSafeString(get_option('defuse_key'));

Using the key.

use Defuse\Crypto\Key;
use Defuse\Crypto\Crypto;

$key = Key::loadFromAsciiSafeString(get_option('defuse_key'));

$encrypted = Crypto::encrypt('something secret', $key, false);
$decrypted = Crypto::decrypt($encrypted, $key, false);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants