Passbolt CSRF令牌不匹配

时间:2019-07-03 15:05:46

标签: docker ssl nginx csrf csrf-token

我构建扩展并将其手动安装到chrome中。除了创建新内容外,其他所有功能都可以正常运行。我无法创建任何密码或用户。它说“ CSRF令牌不匹配”。当我查看请求标头时,会看到类似以下内容的

Accept: */*
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9,tr;q=0.8
Connection: keep-alive
Content-Length: 743
Content-Type: application/json
Cookie: csrfToken=************; CAKEPHP=********
DNT: 1
Host: local.passbolt.com
Origin: https://local.passbolt.com
Referer: https://local.passbolt.com/app/passwords
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.119 Safari/537.36
X-CSRF-Token: null
X-Requested-With: XMLHttpRequest

我在具有多个虚拟主机的反向代理后面使用Passbolt,并试图在大约2个工作日内解决此问题。真的需要您的帮助。

  • Passbolt版本:Ducker Hub上托管的Docker容器
  • 浏览器:Chrome 72.0.3626.119
  • Web服务器:Nginx 1.14.0 / Ubuntu

你做了什么

按照这些说明使用密码https://help.passbolt.com/hosting/install/ce/docker.html

并按照以下说明构建密码扩展https://github.com/passbolt/passbolt_browser_extension

这是我的Nginx conf:

upstream passbolt{
  server 127.0.0.1:4343;
}

server {
  listen 443 ssl;
  listen [::]:443 ssl;
  server_name local.passbolt;
  add_header X-XSS-Protection "1; mode=block";
  proxy_cookie_path / "/; HTTPOnly; Secure";

  ssl on;
  ssl_certificate /etc/nginx/certs/ssl/cert.crt;
  ssl_certificate_key /etc/nginx/certs/ssl/cert.key;
  ssl_protocols TLSv1 TLSv1.1 TLSv1.2;

  ssl_prefer_server_ciphers   on;
  ssl_ciphers "EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM EECDH+ECDSA+SHA384 EECDH+ECDSA+SHA256 EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 EECDH+aRSA+RC4 EECDH EDH+aRSA HIGH !RC4 !aNULL !eNULL !LOW !3DES !MD5 !EXP !PSK !SRP !DSS";
  ssl_dhparam    /etc/nginx/certs/dhparams.pem;

  location / {
    proxy_pass https://passbolt/;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_set_header Host $http_host;

    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forward-Proto http;
    proxy_set_header X-Nginx-Proxy true;
    proxy_redirect off;
  }
}

发生了什么

创建用户并登录密码后,尝试创建安全密码,它给我CSRF令牌不匹配错误,代码为403。并且在“ docker日志”或nginx反向代理日志中看不到任何详细的日志。

0 个答案:

没有答案