Skip to content

Fix Exploits In Code Type Questions#145

Merged
HassanAbouelela merged 2 commits into
mainfrom
fix-eval-exploits
Feb 24, 2022
Merged

Fix Exploits In Code Type Questions#145
HassanAbouelela merged 2 commits into
mainfrom
fix-eval-exploits

Conversation

@HassanAbouelela
Copy link
Copy Markdown
Contributor

This PR hardens our snekbox script template against a few possible exploits that can force snekbox to pass failing code.

Patching just `sys.stdout` allowed users to still access stdout via
`sys.__stdout__`. The same was true for stderr. Both have been
explicitly patched now.

Signed-off-by: Hassan Abouelela <hassan@hassanamr.com>
Change the exception handler in the unittest template to handle
BaseExceptions that don't inherit from Exception. Additionally, account
for user invoked system exits.

Signed-off-by: Hassan Abouelela <hassan@hassanamr.com>
@HassanAbouelela HassanAbouelela added P2 Medium priority tasks. area: form submission Code relating to the response submission to forms backend. type: bug A bug that needs fixing! labels Feb 15, 2022
@HassanAbouelela HassanAbouelela merged commit ecdf57b into main Feb 24, 2022
@HassanAbouelela HassanAbouelela deleted the fix-eval-exploits branch February 24, 2022 05:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: form submission Code relating to the response submission to forms backend. P2 Medium priority tasks. type: bug A bug that needs fixing!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant