Skip to content

Release 1.26.1#1199

Closed
olivier-rabot wants to merge 1 commit intopreprodfrom
fix/cherry-pick-81a13306
Closed

Release 1.26.1#1199
olivier-rabot wants to merge 1 commit intopreprodfrom
fix/cherry-pick-81a13306

Conversation

@olivier-rabot
Copy link
Contributor

@olivier-rabot olivier-rabot commented Feb 23, 2026

Release 1.26.1

## Ticket(s) lié(s)
1334

## Description
Les comptes OVA secondaires à valider n'apparaissaient plus dans la
liste des utilisateurs à valider.
Amélioration au passage de la récupération de l'adresse

## Screenshot / liens loom 
Avant : 
<img width="1309" height="612" alt="image"
src="https://github.com/user-attachments/assets/2fa6539b-5d0e-4dbc-a54d-b35309521804"
/>
Après
<img width="1205" height="298" alt="image"
src="https://github.com/user-attachments/assets/09f043fe-c50a-4e4b-acfc-896239d2db67"
/>

## Check-list

 - [X] Ma branche est rebase sur main
- [ ] Des tests ont été écrits pour tous les endpoints créés ou modifiés
 - [ ] Refacto "à la volée" des parties sur lesquelles j'ai codée
 - [X] Plus de `console.log`
- [ ] J'ai ajouté une validation de schéma sur la route que j'ai ajouté
ou modifié
 - [ ] J'ai converti les fichiers vue en `<script lang="ts">`
 - [ ] Mon code est en Typescript (autant que possible)

**Testing instructions**

Pré-requis : Avoir un compte OVA principal validé
Séquence : 
    Je créé un compte avec un siret d’un établissement secondaire
    Je valide mon email dans la messagerie
Connecté avec un compte sur l’OVA Siège social dans le menu
Organisateurs puis Liste des utilisateurs
Je dois voir : 
    Mon compte OVA principal
    Le compte OVA secondaire à valider
@revu-bot revu-bot bot requested a review from revu-bot February 23, 2026 14:19
@olivier-rabot olivier-rabot marked this pull request as ready for review February 23, 2026 14:19
Copy link
Collaborator

@revu-bot revu-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

This PR fixes a critical bug where secondary OVA accounts weren't appearing in the user validation list. The fix modifies the SQL query to match accounts by SIREN (first 9 digits) instead of full SIRET, allowing secondary establishments to be properly retrieved.

Key Changes

  • Backend SQL Query: Modified to use SIREN-based matching (substr(u.siret,1,9)) instead of exact SIRET matching
  • Address Retrieval: Added fallback to opm_etablissements table with UNION for better address coverage
  • Frontend Error Handling: Added try-catch block to prevent crashes when parsing malformed addresses

Issues Found

  1. [CRITICAL] SQL injection vulnerability in UNION query with unvalidated SIRET
  2. [IMPORTANT] Inconsistent whitespace (tabs mixed with spaces) in SQL query
  3. [IMPORTANT] Missing null/undefined check before string operations
  4. [MINOR] Silent error handling may hide data quality issues

@olivier-rabot olivier-rabot changed the title fix: 1334 fusage ova second account to valid disapear (#1197) Release 1.26.1 Feb 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants