The `anonok` plugin is **not** enabled
+> What are your complete `add_plugins` and `disable_plugins` options?
+> Which version of ikiwiki are you running? Are you using any third-party
+> plugins or patches? --[[smcv]]
+
+>> Pasted [[here|addplugins]]
+
+>>> I asked three questions and you gave one answer. Please answer the
+>>> other two questions. --[[smcv]]
+
---
## Steps
-I've tried to place a comment clicking in the obvious [Add a comment](https://dev.iikb.xyz/ikiwiki.cgi?do=comment&page=forum%2FTema_bootstrap) in a [forum post](https://dev.iikb.xyz/forum/Tema_bootstrap/).
+I've tried to place a comment clicking in the obvious [Add a comment](https://dev.iikb.org/ikiwiki.cgi?do=comment&page=forum%2FTema_bootstrap) in a [forum post](https://dev.iikb.org/forum/Tema_bootstrap/).
I've not signed in because the *sign in* page didn't come up, instead a simple `(You might want to Signin first?)` showed up, which I've haven't read and commented away.
## Results
-As a consequence of that, the user '' - that's a null character, have somehow logged in and it seems that there is no way to [log it out](https://dev.iikb.xyz/ikiwiki.cgi?do=prefs).
+As a consequence of that, the user '' - that's a null character, have somehow logged in and it seems that there is no way to [log it out](https://dev.iikb.org/ikiwiki.cgi?do=prefs).
-None of this phantom user edits are being commited - this [blog post](https://dev.iikb.xyz/blog/posts/Bug_severo_neste_site/) was made with that user logged in via web.
+None of this phantom user edits are being commited - this [blog post](https://dev.iikb.org/blog/posts/Bug_severo_neste_site/) was made with that user logged in via web.
It seems I can't log out from nowhere. I've rebuild the wiki from the command line and restarted the nginx server, the phantom user remains logged in and open to anyone willing to edit away the wiki.
+> I wonder whether this might be caused by the combination of the `httpauth` plugin
+> with the nginx web server. `httpauth` is known to work correctly with Apache,
+> but you might be the first to use it with nginx.
+>
+> Specifically, I wonder whether `$cgi->remote_user()` might be returning the
+> empty string. Looking at the code, we expect it to be either a non-empty
+> username, or `undef`.
+>
+> Please try installing this CGI script on your nginx server, making it
+> executable and accessing its URL without carrying out any special HTTP
+> authentication (you can delete the script immediately afterwards if
+> you want). If my theory is right, you will see a line `REMOTE_USER=` in
+> the output. Post the output somewhere, or mail it to `smcv` at
+> `debian.org` if you don't want to make it public.
+>
+> ```
+> #!/bin/sh
+> printf 'Content-type: text/plain\r\n\r\n'
+> env | LC_ALL=C sort
+> ```
+>
+> If you do not intend to use
+> [HTTP basic authentication](https://en.wikipedia.org/wiki/Basic_access_authentication),
+> please do not enable the `httpauth` plugin. That plugin is intended to be used
+> in conjunction with a web server configured to require HTTP basic authentication
+> with one of a limited set of authorized usernames.
+>
+> --[[smcv]]
+>
+>> If my theory is correct, ikiwiki git master now works around this, and the
+>> [[plugins/httpauth]] documentation now recommends a more correct configuration.
+>> --[[smcv]]
+
---
## Conclusion
If I wanted to do a totally anonnymous wiki, this would be the best setup ever.
-For [this particular installation](https://dev.iikb.xyz), that's not the case.
+For [this particular installation](https://dev.iikb.org), that's not the case.
---
## Question
Is there a session file or something to logout this phantom user?
+
+> See [[tips/inside_dot_ikiwiki]]. `.ikiwiki/userdb` is a Perl Storable file;
+> there are instructions for inspecting it on that page. `.ikiwiki/sessions.db`
+> is most likely a Berkeley DB file.
+>
+> I would be interested to see the contents of these two files and the complete
+> `.setup` file. I would also be interested to see a tarball of the entire
+> wiki source directory, if it isn't excessively large. If you'd be willing to
+> share them, please contact <mailto:smcv@debian.org>. --[[smcv]]
+
+>> I think I've sent right away when you asked, anyway I still have the tarball hanging around. The last *iikb* domains will expire next month though, the wiki will only be accessible by mirror <https://notabug.org/iikb/dev.iikb.org>.
+
+>>> I see from the tarball that you have a lot of uncommitted changes. This is
+>>> probably because whatever is causing the anonymous accesses to succeed is
+>>> breaking other code paths by giving them an empty username: in particular
+>>> it seems reasonably likely that the `git` plugin will refuse to commit
+>>> changes in that situation.
+>>>
+>>> I would expect that you should be getting error messages on the ikiwiki
+>>> CGI script's `stderr` in this situation. In Apache they would normally
+>>> end up in `error.log`; I don't know how nginx does logging, but it is
+>>> probably something similar. Please check that log for relevant-looking
+>>> error messages. --[[smcv]]