standard library email.parser fails to recognize multipart message
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Python
- Estrellas
- 77.2k
- Forks
- 35.9k
- Métricas de merge de PR
- Métricas de PR pendientes
Descripción
Bug report
Bug description:
If an email message with attachments contain a boundary with the characters "<--- ... --->" the email.parser module fails to recognize the message as being multipart.
I have attached to this bug report an example mailbox file, and when the following snippet is run on it you will see that is_multipart() returns False, although the message is clearly a multipart message.
I found this boundary string used in a real life email I received.
from email.parser import Parser
# Create parser instance
P = Parser()
with open("message-error.mbox") as f:
msg = P.parse(f)
print(msg.is_multipart())
CPython versions tested on:
3.13
Operating systems tested on:
Linux
Linked PRs
- gh-135891
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza con el buzón message-error.txt proporcionado y el fragmento de email.parser Parser; después, inspecciona el manejo de los límites multipart en la biblioteca estándar. Revisa el PR enlazado gh-135891 sobre el trabajo que ya está en curso. La tarea estará terminada cuando el ejemplo se reconozca como multipart y msg.is_multipart() devuelva True.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- python
- Área
- backend
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 30/100