What is the problem?
If you are logged into SVGTranslate with an account that does not exist on Commons, if you upload you get:
500: Internal Server Error Unable to get CSRF token from: {"error":{"code":"mwoauth-invalid-authorization-invalid-user","info":"The authorization headers in your request are for a user that does not exist here","*":"See https://commons.wikimedia.beta.wmflabs.org/w/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for notice of API deprecations and breaking changes."},"servedby":"deployment-mediawiki-09"}
Bug reported by @ifried.
Steps to reproduce problem
- Create an account on https://meta.wikimedia.beta.wmflabs.org/wiki/Main_Page
- Go to https://tools.wmflabs.org/svgtranslate-test/File:2002_AJ129-orbit_(multilingual).svg (for example) and click "Log in"
- Login as the user you created in step 1
- Select a translation language and type some translations
- Click "Upload to Commons"
Expected behavior: Some kind of user friendly notification that the user needs to login to Commons first in order to be able to upload translations.
Observed behavior: The 500 internal server error above.