Jump to content

Topic on Extension talk:VisualEditor/Flow

Error contacting the Parsoid/RESTBase server (HTTP 401)

6
TruckerB88 (talkcontribs)

I've got this error when I try to edit an article with Visual Editor. This error does not appear when I write a new article.

So, LapisLazuli33 wrote good pieces of information about rewrite rule. And so I found out, that my .htaccess auth file makes the problem:

AuthUserFile /www/htdocs/*/*/.htpasswd

AuthGroupFile /dev/null

AuthName 'please insert password'

AuthType Basic

require valid-user

When I rename the file, I can use VisualEditor. But this authorization is important for my NGO. Is there a way, I can use both?

46.5.70.252 (talkcontribs)

Yes same here on my test MediaWiki installation which is protected by a basic auth for the whole virtual host in nginx. If I delete the basic auth, everything is working fine. But I think there should be a way to use MediaWiki and VE behind a basic auth???

cheers

Andreas

Eddie K Smith (talkcontribs)

maybe the following helps, depending on your setup Topic:Vvu2fvadigl0mleu


It whitelists localhost, the VisualEditor user-agent, and an authenticated user...


  SetEnvIfNoCase User-Agent VisualEditor-MediaWiki/* visualeditor

  <Directory /var/www/>

               AuthUserFile /var/www/files/.htpasswd

               AuthName "Restricted Access"

               AuthType Basic

               Require local

               Require env visualeditor

               Require valid-user

  </Directory>

Alaub81 (talkcontribs)

Thanks for the hint. I am using nginx and my solution is the following:

  # BASIC AUTH infront of the complete vhost
  # Excluding the VisualEditor user agent
  satisfy any;
  auth_basic 'Restricted Area';
  auth_basic_user_file /etc/nginx/conf.d/.htpasswd.pwd;
  auth_request /auth;
  location = /auth {
      if ($http_user_agent ~ VisualEditor-MediaWiki/*) {
         return 200;
      }
         return 403;
      }
82.120.36.23 (talkcontribs)

Sorry but your solution implied security problem.

If i switch "user agent" on my browser the basic auth not exist.

193.80.211.83 (talkcontribs)

Hello,


I also want to use MediaWiki behind a Basic Auth (in my case haproxy), and I am running into the same problem.

Is there any other possibility to use the VisualEditor with MediaWiki, behind Basic Auth? As "82.120.36.23" says, it's a security hole, you just need to change your user-agent to VisualEditor-Mediawiki/* and you can access the Wiki without any authentication.

Reply to "Error contacting the Parsoid/RESTBase server (HTTP 401)"