github / github/codeql

Flask ImmutableMultiDict type cannot be accurately determined when calling to_dict

Aberta
#19,902 1 comentário 0 reações 0 responsáveis Ver no GitHub
question
Linguagem predominante
CodeQL
Estrelas
10.1k
Forks
2.1k
Merge médio
2d 15h
PRs com merge (30d)
141

Descrição

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)

Guia de contribuição

Abrir o guia de contribuição

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
flask, python
Domínio
security
Tipo de issue
Bug
Dificuldade
4/5
Tempo estimado
3-5 dias
Status de atividade
Estagnada
Clareza
Precisa de esclarecimento
Facilidade para iniciantes
35/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.