github / github/codeql

Flask ImmutableMultiDict type cannot be accurately determined when calling to_dict

Đang mở
#19,902 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
question
Ngôn ngữ chính
CodeQL
Star
10.1k
Fork
2.1k
Merge trung bình
2 ngày 15 giờ
Pull request đã merge (30 ngày)
141

Mô tả

In Flask, the ImmutableMultiDict type cannot be accurately determined when calling to_dict()

```
from flask import Flask, render_template, request, redirect, url_for

def post(self):
f = request.form
param = f.to_dict()
vv = param["vv"]
pp = "/test/%s" % (vv)
os.system(pp)
```

![Image](https://github.com/user-attachments/assets/2fb58e31-495b-4512-a9f8-9df2e600d595)

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Start with the Flask example using request.form and to_dict(), then inspect the CodeQL modeling for Flask's ImmutableMultiDict and its to_dict() return type. Confirm the reported type-resolution behavior and identify the relevant CodeQL tests; done means the type is accurately determined for this case.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
flask, python
Lĩnh vực
security
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.