Page MenuHomePhabricator

Protect POST on api/v1.0/upload/
Closed, ResolvedPublic

Description

We should enable some sort of authentication check there. Since we are on Sessions here, I think session AUTh should be the easiest.

https://www.django-rest-framework.org/api-guide/authentication/#sessionauthentication should be the place to look. Its funny we use self.request.user there though.

Event Timeline

Added it to the latest Patch Set. Let me know if I should make any changes

Can you link the patch here ? @Abbasidaniyal. Also see that you can automatically make that link if you add that Bug: <> in your commit message. See http://www.mediawiki.org/wiki/Gerrit/Commit_message_guidelines

Change 613837 had a related patch set uploaded (by 01tonythomas; owner: Abbasidaniyal):
[labs/tools/gdrive-to-commons@master] Add: tests + minor fixes

https://gerrit.wikimedia.org/r/613837

Change 613837 merged by jenkins-bot:
[labs/tools/gdrive-to-commons@master] Introduce SessionAuthentication for Upload API + tests.

https://gerrit.wikimedia.org/r/613837