RawDataState.get_uid() returns a VALARM's UID when it comes before the event's own UID
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 68/100
Línea de trabajo
Empieza en caldav/datastate.py y compara RawDataState.get_uid() con el comportamiento descrito en la incidencia para el análisis completo y con el comportamiento de IcalendarState.get_uid(). Reproduce el ejemplo de UID con la alarma antes del evento y, después, revisa las pruebas existentes para la búsqueda de UID sin procesar. Se considera terminado cuando el acceso sin analizar devuelve event-1 en ese ejemplo y coincide con el acceso analizado.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Disclaimer: AI-generated text below the line, generated by Claude Opus 5.5, from the prompts:
Do a review of PR#787
[file the finding found]
RawDataState.get_uid() (caldav/datastate.py), the cheap accessor behind .id of an object that is not parsed yet, takes the first line matching ^UID: anywhere in the data. RFC 9074 section 4 allows a UID inside a VALARM, so if the VALARM comes before the event's own UID line, .id returns the alarm's UID:
BEGIN:VCALENDAR
BEGIN:VEVENT
BEGIN:VALARM
UID:alarm-1
ACTION:DISPLAY
TRIGGER:-PT5M
END:VALARM
UID:event-1
DTSTART:20260101T000000Z
END:VEVENT
END:VCALENDAR
RawDataState(data).get_uid() returns alarm-1. The full-parse fallback (DataState.get_uid()) and IcalendarState.get_uid() only look at VEVENT/VTODO/VJOURNAL/VFREEBUSY, and return event-1 — so .id changes once the object gets parsed.
The consequences are those fixed for folded UIDs in https://github.com/python-caldav/caldav/pull/787: get_object_by_uid() filters out the right object, save(no_overwrite=True) / save(no_create=True) check the wrong UID. Most clients write the UID before any VALARM, so this is likely rare in practice.
A possible fix: only accept a UID: line when no BEGIN:VALARM (or any other subcomponent) is open at that point, or fall back to the full parse whenever the data contains BEGIN:VALARM before the first UID:.
- Lenguaje dominante
- Python
- Estrellas
- 412
- Forks
- 113
- Merge medio
- 11 h 37 min
- PR fusionados (30 d)
- 50
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la 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.
Más de python-caldav/caldav
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
python-caldav/caldav#799 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
python-caldav/caldav#792 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
python-caldav/caldav#687 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 75/100
python-caldav/caldav#796 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 66/100
python-caldav/caldav#795 ·
Los mantenedores suelen responder en 1 día
Todos los issues de python-caldav/caldav
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
eclipse-score/inc_someip_gateway#356 ·
Los mantenedores suelen responder en 2 días
-
[BUG]: `GitHubRestAdapter.check_user_permission` and `has_write_access` raise `TypeError` (missing `params`), silently disabling the inactivity lifecyclePosiblemente ocupada @tarunagnihotri534 la tomó hoy. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
AOSSIE-Org/Gitcord-GithubDiscordBot#167 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
mihai-vlc/sublime-jsfmt#56 ·
-
comp/cli comp/plugins P2 type/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
NousResearch/hermes-agent#141917 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 78/100
riscv/riscv-opcodes#441 ·