-
Notifications
You must be signed in to change notification settings - Fork 184
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
Accidentally added %0A ( \n newline) at the end of some tags #669
Comments
I'm not familiar poking at the API this way, but have you tried encoding the And I'd agree, there should be a sanity check for characters before adding tags. szurubooru/server/szurubooru/func/tags.py Line 182 in d102578
would be a good start to implement one. Currently I'm in the process of bending other parts of my instance into shape, but eventually this is something I'd want to have too. |
This is already addressed in szurubooru/server/szurubooru/func/tags.py Lines 39 to 44 in d102578
Assuming the tag regex was not modified, I am lead to believe that the illegal character in question was in fact not a newline, as it would have negated the expression If you try to interrogate the API for the tag list e.g. curl -X GET
-H 'Accept: application/json' \
-H 'Authorization: Token blablabla='
myszuruip/api/tags?query=cheese*' what name does it return? |
I made a bash script to mass upload images using the API and tag them by using a string containing the tags inside the metadata of the image. very hacky but it kinda works.
While working out how to trim whitespace characters, i accidentally created some tags with a newline character at the end. e.g.
myszuruip/tag/cheese%0A
When trying to click the tag in the tags view, it says "Requested path /tag/cheese was not found."
Which makes it impossible to rename or delete such tags using the client.
I tried to use curl to GET and on success PUT edit or deletethe tag, it converts the
%0A
into\n
BTW: Is this considered a bug, if it is possible to add invalid characters through API?
The text was updated successfully, but these errors were encountered: