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

TermIt does not prevent manual setting of invalid URI as identifier #511

Closed
ledsoft opened this issue Sep 6, 2024 · 0 comments
Closed
Labels
bug Something isn't working

Comments

@ledsoft
Copy link
Contributor

ledsoft commented Sep 6, 2024

Problem description

While TermIt identifier generator generates only valid URIs, because the user is able to manually edit the identifier, they are able to set an invalid URI as identifier value. In this case, TermIt should refuse the identifier with a reasonable error message so that the user is able to fix the problem.

Example:
http://agentura-cas.cz/DSS---vlastnosti/class/delka-dostriku-[m]

Solution alternatives

  1. Validate the identifier input immediately in the UI and prevent saving the asset (Term, Vocabulary) when the identifier is not a valid URI
  2. Validate the identifier on the backend (which will probably be necessary anyway, because a REST client might send data with invalid identifier, bypassing the UI) and return a reasonable error message.
@ledsoft ledsoft added the bug Something isn't working label Sep 6, 2024
lukaskabc added a commit to lukaskabc/termit that referenced this issue Sep 16, 2024
…d before each persists and updates.

Base repository will validate the identifier (URI) during each pre-persist and pre-update.
InvalidIdentifierException caused by URISyntaxException will now provide error details to the client.
lukaskabc added a commit to lukaskabc/termit-ui that referenced this issue Sep 16, 2024
lukaskabc added a commit to lukaskabc/termit-ui that referenced this issue Sep 17, 2024
lukaskabc added a commit to lukaskabc/termit-ui that referenced this issue Sep 19, 2024
lukaskabc added a commit to lukaskabc/termit that referenced this issue Sep 19, 2024
Rename isCausedBy to findCause to reflect changed return type.
ledsoft added a commit that referenced this issue Sep 19, 2024
[Bug #511] Add translations for invalid identifier errors
ledsoft pushed a commit to kbss-cvut/termit that referenced this issue Sep 19, 2024
…d before each persists and updates.

Base repository will validate the identifier (URI) during each pre-persist and pre-update.
InvalidIdentifierException caused by URISyntaxException will now provide error details to the client.
ledsoft pushed a commit to kbss-cvut/termit that referenced this issue Sep 19, 2024
Rename isCausedBy to findCause to reflect changed return type.
@ledsoft ledsoft closed this as completed Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant