Skip to content
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

[Bug]: admin cannot login after fresh install (The form token is not valid) #1816

Open
2 tasks done
injaan opened this issue Nov 23, 2024 · 1 comment
Open
2 tasks done
Labels
bug Something isn't working

Comments

@injaan
Copy link

injaan commented Nov 23, 2024

⚠️ This issue respects the following points: ⚠️

  • This is a bug, not a question or a configuration issue.
  • This issue is not already reported on Github (I've searched it).

Bug description

I have freshly installed SFTPGo on Ubuntu 22. After setting up the admin user and creating a password for the first time, I attempted to log in to the admin panel. However, when I try to log in with my admin credentials, I encounter the following error: “The form token is not valid”

Steps to reproduce

  1. Install SFTPGo on Ubuntu 22.04 using "apt install sftpgo" as root user
  2. reverse proxy 8080 to ftp.mydomain.com using nginx
  3. access to my domain (my domain is behind cloudflare proxy:https )
  4. create an admin user and set the password during the first time setup.
  5. Attempt to log in to the admin panel with the created admin credentials.
  6. Encounter the “The form token is not valid” error.

Expected behavior

Successful login

SFTPGo version

SFTPGo 2.6.3-cf3e1d3e-2024-11-15T16:58:44Z

Data provider

local

Installation method

Community Deb package

Configuration

no customization

Relevant log output

Nov 23 07:26:21 ubuntu-8gb-hel1-1 sftpgo[8234]: {"level":"debug","time":"2024-11-23T07:26:21.453","sender":"httpd","local_addr":"[::1]:8080","method":"POST","proto":"HTTP/1.1","remote_addr":"[::1]:44714","request_id":"ubuntu-8gb-hel1-1/mT6MWW4Jyg-000001","uri":"http://ftp.mydomain.mn/web/admin/login","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36","resp_status":200,"resp_size":28767,"elapsed_ms":6}
Nov 23 07:26:28 ubuntu-8gb-hel1-1 sftpgo[8234]: {"level":"debug","time":"2024-11-23T07:26:28.443","sender":"httpd","message":"error validating CSRF token IP audience"}
Nov 23 07:26:28 ubuntu-8gb-hel1-1 sftpgo[8234]: {"level":"debug","time":"2024-11-23T07:26:28.445","sender":"httpd","local_addr":"127.0.0.1:8080","method":"POST","proto":"HTTP/1.1","remote_addr":"127.0.0.1:45002","request_id":"ubuntu-8gb-hel1-1/mT6MWW4Jyg-000002","uri":"http://ftp.mydomain.mn/web/admin/login","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36","resp_status":200,"resp_size":28775,"elapsed_ms":3}

What are you using SFTPGo for?

Private user, home usecase (home backup/VPS)

Additional info

No response

@injaan injaan added the bug Something isn't working label Nov 23, 2024
@injaan
Copy link
Author

injaan commented Nov 23, 2024

I've disabled cloudflare proxy and accessed http protocol and getting still same error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant