Skip to content

Conversation

@TomHanra
Copy link

@TomHanra TomHanra commented Apr 3, 2023

Changes hack.py in Issue 1 to support a solution which returns errors when strange inputs are encountered, updates solution.py to error when input validation fails.

Why:

Closes #12

What's being changed:

  • hack.py test 4 in Issue 1 has been changed to assert the return string from validorder is not equal to the success message where the balance is all paid off.
  • solution.py in Issue1 has been changed to return with error messages for all validation failures.
  • solution.py has two new functions, validamount and validquantity. The first reduces code duplication but the second was also included so that the code and flow from the original validorder function is clearer

@heiskr heiskr requested review from a team and jkcso April 3, 2023 15:14
@jkcso
Copy link
Collaborator

jkcso commented Apr 3, 2023

I fully appreciate the time and effort that you put here @TomHanra. I prefer to accept this PR because the author emailed us a few days before you and asked if he can implement it. Thank you and I hope you enjoy the secure code game!

cc @heiskr

@jkcso jkcso closed this Apr 3, 2023
bgalek added a commit to bgalek/secure-code-game-fork that referenced this pull request May 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Solution for Valid Order in Issue 1 should be more consistent in its behaviour

2 participants