2

I need to do some regularly backup of my sharelatex source-files. Sharelatex runs via docker on my ubuntu server. The easiest way to do this seems to be the download source option: localhost:5000/project/UUID/download/zip

Now i want to build a small shell script to download this and copy it to my dropbox folder. The problem is: you need to login before you can download the files, even if the project is set to public... so i get redirected to: localhost:5000/login

I manually checked the login-request. It sends some json like this:

'{"_csrf":"FxcA1Ji9-8YFN1UPw72qn5WlnJoxRgGkpWO0","email":"foo@bar.com","password":"foofoo"}'

Research showed that _csrf is some type of Cross-Site Request Forgery (CSRF) Prevention. The sharelatex front-end is written using AngularJS. So this way does not work. How can i authenticate with wget or curl to angular?

Thanks a lot in advance!

Hendrik
  • 93
  • 6

0 Answers0