You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a minor issue with the sanitation of the tokens.
In our lab, we have Experiment Factory running headless and send tokens per email to the participants.
It has happened several times that when the participants do a copy & paste of the token, they introduce a unicode zero width space character (\u200b). This causes an error when ExpFact tried to check for the existence of the token's directory.
We worked around this issue by using the following code in views/headless.py:69
I think that would be a fine solution - quick glances around seem to suggest something similar. Would you care to PR and make this change, add a note to the changelog and version bump? If you are participating I can give you credit for a Hacktoberfest PR!
There is a minor issue with the sanitation of the tokens.
In our lab, we have Experiment Factory running headless and send tokens per email to the participants.
It has happened several times that when the participants do a copy & paste of the token, they introduce a unicode zero width space character (\u200b). This causes an error when ExpFact tried to check for the existence of the token's directory.
We worked around this issue by using the following code in views/headless.py:69
token = form.token.data.encode('ascii', errors = 'ignore').decode().strip()
This fixed the problem but is probably not the best solution. Perhaps a more thorough sanitation of the tokens is due.
The text was updated successfully, but these errors were encountered: