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 with a large attempt key #2746

Open
4 tasks
brianhogg opened this issue Aug 22, 2024 · 0 comments
Open
4 tasks

Fatal error with a large attempt key #2746

brianhogg opened this issue Aug 22, 2024 · 0 comments
Assignees

Comments

@brianhogg
Copy link
Contributor

Reproduction Steps

  1. Visit the page for the results of a quiz
  2. Change attempt_key= to attempt_key=999999999999999999999

Expected Behavior

Shows quiz information but no quiz attempt details.

Actual Behavior

Fatal error

Error Messages / Logs

Fatal error: Uncaught DivisionByZeroError: Modulo by zero in /srv/users/manager/apps/hogg-new/public/wp-content/plugins/lifterlms/includes/class.llms.hasher.php:136 Stack trace: #0 /srv/users/manager/apps/hogg-new/public/wp-content/plugins/lifterlms/includes/class.llms.hasher.php(221): LLMS_Hasher::mod(0, 4.3674252383914E+37) #1 /srv/users/manager/apps/hogg-new/public/wp-content/plugins/lifterlms/includes/models/model.llms.student.quizzes.php(335): LLMS_Hasher::unhash('999999999999999...') #2 /srv/users/manager/apps/hogg-new/public/wp-content/plugins/lifterlms/includes/models/model.llms.student.quizzes.php(155): LLMS_Student_Quizzes->parse_attempt_key('999999999999999...') #3 /srv/users/manager/apps/hogg-new/public/wp-content/plugins/lifterlms/templates/quiz/results.php(40): LLMS_Student_Quizzes->get_attempt_by_key('999999999999999...') #4 /srv/users/manager/apps/hogg-new/public/wp-content/plugins/lifterlms/includes/functions/llms.functions.template.php(120): include('/srv/users/mana...') #5 /srv/users/manager/apps/hogg-new/public/wp-content/plugins/lifterlms/includes/functions/llms.functions.templates.quizzes.php(162): llms_get_template('quiz/results.ph...') #6 /srv/users/manager/apps/hogg-new/public/wp-includes/class-wp-hook.php(324): lifterlms_template_quiz_results('') #7 /srv/users/manager/apps/hogg-new/public/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #8 /srv/users/manager/apps/hogg-new/public/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #9 /srv/users/manager/apps/hogg-new/public/wp-content/plugins/lifterlms/templates/content-single-quiz-before.php(13): do_action('lifterlms_singl...') #10 /srv/users/manager/apps/hogg-new/public/wp-includes/template.php(812): require('/srv/users/mana...') #11 /srv/users/manager/apps/hogg-new/public/wp-content/plugins/lifterlms/includes/functions/llms-functions-content.php(52): load_template('/srv/users/mana...', false) #12 /srv/users/manager/apps/hogg-new/public/wp-includes/class-wp-hook.php(324): llms_get_post_content('<p>Test quiz he...') #13 /srv/users/manager/apps/hogg-new/public/wp-includes/plugin.php(205): WP_Hook->apply_filters('<p>Test quiz he...', Array) #14 /srv/users/manager/apps/hogg-new/public/wp-includes/blocks/post-content.php(50): apply_filters('the_content', '<p>Test quiz he...') #15 /srv/users/manager/apps/hogg-new/public/wp-includes/class-wp-block.php(519): render_block_core_post_content(Array, '<p>Test quiz he...', Object(WP_Block)) #16 /srv/users/manager/apps/hogg-new/public/wp-includes/class-wp-block.php(499): WP_Block->render() #17 /srv/users/manager/apps/hogg-new/public/wp-includes/blocks.php(2061): WP_Block->render() #18 /srv/users/manager/apps/hogg-new/public/wp-includes/blocks.php(2113): render_block(Array) #19 /srv/users/manager/apps/hogg-new/public/wp-includes/block-template.php(260): do_blocks('<!-- wp:templat...') #20 /srv/users/manager/apps/hogg-new/public/wp-includes/template-canvas.php(12): get_the_block_template_html() #21 /srv/users/manager/apps/hogg-new/public/wp-includes/template-loader.php(106): include('/srv/users/mana...') #22 /srv/users/manager/apps/hogg-new/public/wp-blog-header.php(19): require_once('/srv/users/mana...') #23 /srv/users/manager/apps/hogg-new/public/index.php(17): require('/srv/users/mana...') #24 {main} thrown in /srv/users/manager/apps/hogg-new/public/wp-content/plugins/lifterlms/includes/class.llms.hasher.php on line 136

This issue has be recreated:

  • Locally
  • On a staging site
  • On a production website
  • With only LifterLMS and a default theme
@ideadude ideadude moved this to Awaiting Triage in Development Aug 22, 2024
@ideadude ideadude self-assigned this Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Awaiting Triage
Development

No branches or pull requests

2 participants