-
Notifications
You must be signed in to change notification settings - Fork 1
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
re add bugs #5
base: master
Are you sure you want to change the base?
re add bugs #5
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -210,6 +210,11 @@ def csrf_transfer_monei_api(request,recipent,amount): | |
# @authentication_decorator | ||
@csrf_exempt | ||
def mitre_lab_25_api(request): | ||
if request.method == "POST": | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line comment 2 |
||
expression = request.POST.get('expression') | ||
result = eval(expression) | ||
Check failure Code scanning / SonarCloud Dynamic code execution should not be vulnerable to injection attacks
<!--SONAR_ISSUE_KEY:AYgAsTtYOS9Mz-alJxJl-->Change this code to not dynamically execute code influenced by user-controlled data. <p>See more on <a href="https://sonarcloud.io/project/issues?id=linear-b_pygoat&issues=AYgAsTtYOS9Mz-alJxJl&open=AYgAsTtYOS9Mz-alJxJl&pullRequest=5">SonarCloud</a></p>
|
||
return JsonResponse({'result': result}) | ||
else: | ||
return redirect('/mitre/25/lab/') | ||
|
||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -156,7 +156,9 @@ def sql_lab(request): | |
print(sql_query) | ||
try: | ||
print("\nin try\n") | ||
val="" | ||
val=login.objects.raw(sql_query) | ||
PavelLinearB marked this conversation as resolved.
Show resolved
Hide resolved
|
||
val=login.objects.raw(sql_query) | ||
|
||
val=login.objects.raw(sql_query) | ||
|
||
except: | ||
print("\nin except\n") | ||
return render( | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line comment #1 - review started