[GH-ISSUE #303] CSRF token problem #201

Closed
opened 2026-02-27 15:57:43 +03:00 by kerem · 10 comments
Owner

Originally created by @lord-kyron on GitHub (Mar 30, 2020).
Original GitHub issue: https://github.com/retspen/webvirtcloud/issues/303

@catborise - I am using the latest python3 build from your repo and it was working fine, but suddenly it started giving me only:

Forbidden (403)

CSRF verification failed. Request aborted.

no matter what I do - it always returns this. I cannot login even anymore.
Please, tell me how to fix this!
Thanks!

Originally created by @lord-kyron on GitHub (Mar 30, 2020). Original GitHub issue: https://github.com/retspen/webvirtcloud/issues/303 @catborise - I am using the latest python3 build from your repo and it was working fine, but suddenly it started giving me only: Forbidden (403) CSRF verification failed. Request aborted. no matter what I do - it always returns this. I cannot login even anymore. Please, tell me how to fix this! Thanks!
kerem closed this issue 2026-02-27 15:57:43 +03:00
Author
Owner

@catborise commented on GitHub (Mar 30, 2020):

@lord-kyron i think response time is high. click login and wait... do not click more than one time.
check webvirtcloud env to see disk ram filesystem .

<!-- gh-comment-id:606248296 --> @catborise commented on GitHub (Mar 30, 2020): @lord-kyron i think response time is high. click login and wait... do not click more than one time. check webvirtcloud env to see disk ram filesystem .
Author
Owner

@lord-kyron commented on GitHub (Mar 30, 2020):

@catborise - no, I've tried even with retspen version based on python 2.7 - doing the same.
It is now loading slow - just giving the error immediately.
on nginx log I am getting:
"POST /accounts/login/?next=/ HTTP/2.0" 403 2578 "https://mydomain.com/accounts/login/?next=/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36"

<!-- gh-comment-id:606261988 --> @lord-kyron commented on GitHub (Mar 30, 2020): @catborise - no, I've tried even with retspen version based on python 2.7 - doing the same. It is now loading slow - just giving the error immediately. on nginx log I am getting: "POST /accounts/login/?next=/ HTTP/2.0" 403 2578 "https://mydomain.com/accounts/login/?next=/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36"
Author
Owner

@lord-kyron commented on GitHub (Mar 31, 2020):

I've tried several different browsers and even re-installed webvirctcloud several times - same effect - on login even the very first time it gets 403 forbidden. Can it be something from the OS causing it?

<!-- gh-comment-id:606436272 --> @lord-kyron commented on GitHub (Mar 31, 2020): I've tried several different browsers and even re-installed webvirctcloud several times - same effect - on login even the very first time it gets 403 forbidden. Can it be something from the OS causing it?
Author
Owner

@catborise commented on GitHub (Mar 31, 2020):

@lord-kyron where do you install webvlrtcloud. directly on host? on docker? on a vm?

<!-- gh-comment-id:606445235 --> @catborise commented on GitHub (Mar 31, 2020): @lord-kyron where do you install webvlrtcloud. directly on host? on docker? on a vm?
Author
Owner

@lord-kyron commented on GitHub (Mar 31, 2020):

directly on host - ubuntu 18.04

<!-- gh-comment-id:606451972 --> @lord-kyron commented on GitHub (Mar 31, 2020): directly on host - ubuntu 18.04
Author
Owner

@catborise commented on GitHub (Mar 31, 2020):

@lord-kyron, l recommend you seperate . lt will be safe and sound.
use docker on host to seperate. it is easy... you dont have to learn deeply docker. look at webvirtcloud wiki. can you please try it. installation takes 5minutes.
(ny installation on a vm/docker)

<!-- gh-comment-id:606454396 --> @catborise commented on GitHub (Mar 31, 2020): @lord-kyron, l recommend you seperate . lt will be safe and sound. use docker on host to seperate. it is easy... you dont have to learn deeply docker. look at webvirtcloud wiki. can you please try it. installation takes 5minutes. (ny installation on a vm/docker)
Author
Owner

@lord-kyron commented on GitHub (Mar 31, 2020):

Ok, I will try, but looking at the config I woder - how can I use nginx reverse proxy from host to the docker installation. I mean - I know how to forward the web interface. But how to configure docker image for vnc reverse proxy over port 443 on the original host. My setup will be nginx on the host on port 443 to reverse proxy to webvirtcloud + vnc console. Can you suggest? I assume something like:
docker run -d -p MY_reverse_proxy_port:80 -p my_vnc_reverse_proxy_port:6080 retspen/webvirtcloud:1
am I right?

<!-- gh-comment-id:606459481 --> @lord-kyron commented on GitHub (Mar 31, 2020): Ok, I will try, but looking at the config I woder - how can I use nginx reverse proxy from host to the docker installation. I mean - I know how to forward the web interface. But how to configure docker image for vnc reverse proxy over port 443 on the original host. My setup will be nginx on the host on port 443 to reverse proxy to webvirtcloud + vnc console. Can you suggest? I assume something like: `docker run -d -p MY_reverse_proxy_port:80 -p my_vnc_reverse_proxy_port:6080 retspen/webvirtcloud:1` am I right?
Author
Owner

@catborise commented on GitHub (Mar 31, 2020):

@lord-kyron for now install docker for testing environment.
i think you should change also some files for reverse proxy.

if you edit files already, one port definition with -p is enough.

<!-- gh-comment-id:606462226 --> @catborise commented on GitHub (Mar 31, 2020): @lord-kyron for now install docker for testing environment. i think you should change also some files for reverse proxy. if you edit files already, one port definition with -p is enough.
Author
Owner

@lord-kyron commented on GitHub (Mar 31, 2020):

@catborise - thank you! In docker it is working flawlessly!

<!-- gh-comment-id:606540245 --> @lord-kyron commented on GitHub (Mar 31, 2020): @catborise - thank you! In docker it is working flawlessly!
Author
Owner

@catborise commented on GitHub (Mar 31, 2020):

@lord-kyron nice to hear that. isolation always recommended with docker or vm.
docker is our future...(eventhoug i dont like it)

you can update wiki page(add title for reverse proxy), if it is not completed

<!-- gh-comment-id:606555351 --> @catborise commented on GitHub (Mar 31, 2020): @lord-kyron nice to hear that. isolation always recommended with docker or vm. docker is our future...(eventhoug i dont like it) you can update wiki page(add title for reverse proxy), if it is not completed
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/webvirtcloud#201
No description provided.