Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb30579a

Browse files
committed
Set low recursion limit while executing user code
1 parent7484390 commitb30579a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

‎backend/main/workers/worker.py‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,15 @@
2222

2323

2424
defexecute(code_obj):
25+
sys.setrecursionlimit(100)
2526
try:
2627
# noinspection PyTypeChecker
2728
exec(code_obj,console.locals)
2829
exceptExceptionase:
30+
sys.setrecursionlimit(1000)
2931
returnTracebackSerializer().format_exception(e)
32+
finally:
33+
sys.setrecursionlimit(1000)
3034

3135

3236
defrunner(code_source,code):

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp