Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ETQ Candidat, je ne peux pas lancer une recherche de métier si je met des caractères spéciaux dans le champ #2652

Open
bbohec opened this issue Dec 3, 2024 · 0 comments

Comments

@bbohec
Copy link
Contributor

bbohec commented Dec 3, 2024

🐛 Le problème

Caractère identifié : <

Image

durationInSeconds: 0.0021460669999942184
error: {
  "error": "syntax error in tsquery: \"<toto\"",
  "query": "select \"public_appellations_data\".\"ogr_appellation\", \"public_appellations_data\".\"libelle_appellation_long\", \"public_romes_data\".\"libelle_rome\", \"public_romes_data\".\"code_rome\" from \"public_appellations_data\" inner join \"public_romes_data\" on \"public_appellations_data\".\"code_rome\" = \"public_romes_data\".\"code_rome\" where ((\"libelle_appellation_long_without_special_char\" @@ to_tsquery('french', $1) and \"libelle_appellation_long_without_special_char\" ilike $2) or (\"libelle_appellation_long_without_special_char\" ilike $3 and \"libelle_appellation_long_without_special_char\" ilike $4)) limit $5",
  "params": [
    "<toto",
    "%<toto%",
    "%<toto%",
    "%<toto%",
    80
  ]
}
message: "SQL ERROR"

👣 Étapes pour reproduire

J'indique un terme qui contient un caractère spécial qui va jusqu'à la DB.

🎯 Comportement attendu

Le problème ne devrait pas aller au niveau de la DB mais plutot avant en invalidant le champ sans passer par le back

@bbohec bbohec moved this from Vrac to Prêt à développer in Immersion Facilitée Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Prêt à développer
Development

No branches or pull requests

1 participant