5054: docker compose installation results in: CSRF verification failed. Request aborted

marc.guenther

What version are you running?

7.0.4

What's the URL of the page containing the problem?

/account/register/

What steps will reproduce the problem?

  1. I followed the steps in https://github.com/reviewboard/reviewboard/tree/release-7.0.4/contrib/docker/examples/
  2. docker compose up
  3. I can now access the UI in the browser
  4. Now I try to register a new account by going to .../account/register

What is the expected output? What do you see instead?

This results in:
Forbidden (403)
CSRF verification failed. Request aborted.
More information is available with DEBUG=True.

Trying to login does the same thing. I guess this is caused by every form submit?

What operating system are you using? What browser?

Safari and Chrome on MacOS

marc.guenther
#1 marc.guenther

Steps to reproduce:

  • git clone https://github.com/reviewboard/reviewboard.git
  • cd reviewboard/contrib/docker/examples

  • I then did the following changes:
    diff --git a/contrib/docker/examples/docker-compose.postgres.yaml b/contrib/docker/examples/docker-compose.postgres.yaml
    index c4f416ae0..c6b32a9fd 100644
    --- a/contrib/docker/examples/docker-compose.postgres.yaml
    +++ b/contrib/docker/examples/docker-compose.postgres.yaml
    @@ -167,7 +167,7 @@ services:

    • DATABASE_PASSWORD=reviewboard123

    # CHANGEME: Set this to your accessible domain name.
    - - DOMAIN=localhost
    + - DOMAIN=www.review.board

    volumes:
    - sitedir:/site
    @@ -187,15 +187,15 @@ services:

    environment:
    # CHANGEME: Set this to your accessible domain name above.
    - - NGINX_HOST=localhost
    + - NGINX_HOST=www.review.board

    # The public port used to access this instance.
    #
    # If changed, you will need to change 'ports' below to match.
    - - NGINX_PORT=80
    + - NGINX_PORT=8100

    ports:
    - - 80:80
    + - 8100:8100

    volumes:
    - sitedir:/var/www/reviewboard

  • I also had to comment out the two optional services at the end, otherwise I get this:

docker compose -f docker-compose.postgres.yaml up

WARN[0000] /Users/ias/work/reviewboard/contrib/docker/examples/docker-compose.postgres.yaml: the attribute version is obsolete, it will be ignored, please remove it to avoid potential confusion
[+] Running 6/6
✘ docconverter Error pull access denied for beanbag/docconverter, repository does not exist or may require 'docker login' 1.1s
✘ memcached Error context canceled 1.1s
✘ db Error context canceled 1.1s
✘ nginx Error context canceled 1.1s
✘ reviewboard Error context canceled 1.1s
✘ rabbitmq Error context canceled 1.1s
Error response from daemon: pull access denied for beanbag/docconverter, repository does not exist or may require 'docker login'

  • Add entry in /etc/hosts:
    127.0.0.1 localhost www.review.board

  • docker compose -f docker-compose.postgres.yaml up

  • In the browser, go to http://www.review.board:8100

  • and click on Login