github / github/codeql

Flask ImmutableMultiDict type cannot be accurately determined when calling to_dict

Ouverte
#19,902 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
question
Langage dominant
CodeQL
Étoiles
10.1k
Forks
2.1k
Merge moyen
2 j 15 h
PR mergées (30 j)
141

Description

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)

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
flask, python
Domaine
security
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.