Mails cannot be processed if the sender address contains a quote and a user with that address already exists

Abierto
#6,513 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 13 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
62/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
rails, ruby
Área
backend

Línea de trabajo

Reproduce the issue using the three steps in the report, then inspect production.log around the ActiveRecord::RecordInvalid error to trace where the postmaster handles the sender and existing user. Done means mail from an address with a quoted local part is processed as a regular ticket and assigned to the existing user, without creating an error ticket or duplicate user.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

mail processing prioritised by payment user verified
Used Zammad Version

7.2.2

Environment
  • Installation method: any
  • Operating system (if you're unsure: cat /etc/os-release ): any
  • Database + version: any
  • Elasticsearch version: any
  • Browser + version: any
Actual behaviour

An incoming mail from a'[email protected] (a user with that login and email already exists, e.g. via LDAP) is not processed. The postmaster aborts with ActiveRecord::RecordInvalid: Validation failed: Login has already been taken and creates an error ticket instead of a regular ticket.

Expected behaviour

The mail is processed as usual. If a user with the sender address already exists (e.g. imported via LDAP), the mail is assigned to that user and a regular ticket is created; otherwise a single new user is created. The mail does not fail with Validation failed: Login has already been taken and does not end up as an error ticket / unprocessable mail.

A quote (') in the local part of an email address is permitted.

Steps to reproduce the behaviour
  1. Create a user whose login and email are both a'[email protected] (e.g. via LDAP sync)
  2. Send a mail with From: a'[email protected]
  3. The mail is not processed; production.log contains the RecordInvalid and an error ticket is created
Support Ticket

Ticket#10243473

I'm sure this is a bug and no feature request or a general question.

yes

Lenguaje dominante
Ruby
Estrellas
6k
Forks
1.1k
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

  • Incluye un Dockerfile o un archivo de Docker Compose
  • Tiene una plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de zammad/zammad

Todos los issues de zammad/zammad

Issues similares

Más issues de Ruby

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.