[SAC] [OSGeo] #1975: problem with wiki requiring cookies even if they are already allowed

#1975: problem with wiki requiring cookies even if they are already allowed
--------------------+------------------------------
Reporter: hellik | Owner: christian, sac@…
     Type: defect | Status: new
Priority: major | Milestone:
Component: Wiki | Keywords:
--------------------+------------------------------
taken from ML

[https://lists.osgeo.org/pipermail/sac/2017-July/008313.html mail1] and
[https://lists.osgeo.org/pipermail/sac/2017-July/008314.html mail2] and
tested here with [https://wiki.osgeo.org/wiki/Europe wiki]

{{{
Login error
OSGeo Wiki uses cookies to log in users. You have cookies disabled. Please
enable them and try again.
}}}

with several IPs and computers; cookies are enabled.

--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/1975&gt;
OSGeo <http://www.osgeo.org/&gt;
OSGeo committee and general foundation issue tracker.

#1975: problem with wiki requiring cookies even if they are already allowed
--------------------+-------------------------------
Reporter: hellik | Owner: christian, sac@…
     Type: defect | Status: new
Priority: major | Milestone:
Component: Wiki | Resolution:
Keywords: |
--------------------+-------------------------------
Changes (by strk):

* cc: astrodog (added)

Comment:

Also reported as #1976 and I confirm having the problem with multiple
browsers too (cannot login, system says I don't have cookies enabled,
which I clearly have)

Harrison, Christian, Jeff: did you guys change anything recently ?

--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/1975#comment:1&gt;
OSGeo <http://www.osgeo.org/&gt;
OSGeo committee and general foundation issue tracker.

#1975: problem with wiki requiring cookies even if they are already allowed
--------------------+-------------------------------
Reporter: hellik | Owner: christian, sac@…
     Type: defect | Status: new
Priority: major | Milestone:
Component: Wiki | Resolution:
Keywords: |
--------------------+-------------------------------

Comment (by Jeff McKenna):

I didn't make any recent changes, not sure why this occurred.

It seems that this is a common issue though, and one of the solutions is
to modify php.ini with the following change:

{{{
session.referer_check = off
}}}

I restarted Apache and now I can login.

It is a quick-n-dirty solution, maybe the original error is due to a
session file trying to write to a write-protected folder? (not sure why
the permissions would change suddenly though).

Or maybe someone did an update on that VM and PHP was upgraded? Not sure.

Let me know if this change is enough.

--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/1975#comment:2&gt;
OSGeo <http://www.osgeo.org/&gt;
OSGeo committee and general foundation issue tracker.

#1975: problem with wiki requiring cookies even if they are already allowed
--------------------+-------------------------------
Reporter: hellik | Owner: christian, sac@…
     Type: defect | Status: new
Priority: major | Milestone:
Component: Wiki | Resolution:
Keywords: |
--------------------+-------------------------------
Changes (by Jeff McKenna):

* cc: madi (added)

--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/1975#comment:3&gt;
OSGeo <http://www.osgeo.org/&gt;
OSGeo committee and general foundation issue tracker.

#1975: problem with wiki requiring cookies even if they are already allowed
--------------------+-------------------------------
Reporter: hellik | Owner: christian, sac@…
     Type: defect | Status: new
Priority: major | Milestone:
Component: Wiki | Resolution:
Keywords: |
--------------------+-------------------------------

Comment (by strk):

I just received an email from the Cron daemon on that machine: no space
left on device.
That explains impossibility to write cookies !
Do we want another ticket to deal with that Jeff ?

--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/1975#comment:4&gt;
OSGeo <http://www.osgeo.org/&gt;
OSGeo committee and general foundation issue tracker.

#1975: problem with wiki requiring cookies even if they are already allowed
--------------------+-------------------------------
Reporter: hellik | Owner: christian, sac@…
     Type: defect | Status: new
Priority: major | Milestone:
Component: Wiki | Resolution:
Keywords: |
--------------------+-------------------------------

Comment (by Jeff McKenna):

that would explain this. sorry for my mistake.

--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/1975#comment:5&gt;
OSGeo <http://www.osgeo.org/&gt;
OSGeo committee and general foundation issue tracker.

#1975: problem with wiki requiring cookies even if they are already allowed
--------------------+-------------------------------
Reporter: hellik | Owner: christian, sac@…
     Type: defect | Status: new
Priority: major | Milestone:
Component: Wiki | Resolution:
Keywords: |
--------------------+-------------------------------

Comment (by Jeff McKenna):

sandro, since you found it, do you want to tackle??

--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/1975#comment:6&gt;
OSGeo <http://www.osgeo.org/&gt;
OSGeo committee and general foundation issue tracker.

#1975: problem with wiki requiring cookies even if they are already allowed
--------------------+-------------------------------
Reporter: hellik | Owner: christian, sac@…
     Type: defect | Status: new
Priority: major | Milestone:
Component: Wiki | Resolution:
Keywords: |
--------------------+-------------------------------

Comment (by Jeff McKenna):

i am re-enabling that setting now...

--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/1975#comment:7&gt;
OSGeo <http://www.osgeo.org/&gt;
OSGeo committee and general foundation issue tracker.

#1975: problem with wiki requiring cookies even if they are already allowed
--------------------+-------------------------------
Reporter: hellik | Owner: christian, sac@…
     Type: defect | Status: new
Priority: major | Milestone:
Component: Wiki | Resolution:
Keywords: |
--------------------+-------------------------------

Comment (by hellik):

Replying to [comment:2 Jeff McKenna]:
> I didn't make any recent changes, not sure why this occurred.
>
> It seems that this is a common issue though, and one of the solutions is
to modify php.ini with the following change:
>
> {{{
> session.referer_check = off
> }}}
>
> I restarted Apache and now I can login.
>
> It is a quick-n-dirty solution, maybe the original error is due to a
session file trying to write to a write-protected folder? (not sure why
the permissions would change suddenly though).
>
> Or maybe someone did an update on that VM and PHP was upgraded? Not
sure.
>
> Let me know if this change is enough.

-first try: login possible
- second try after removing osgeo wiki cookie: login possible

--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/1975#comment:8&gt;
OSGeo <http://www.osgeo.org/&gt;
OSGeo committee and general foundation issue tracker.

#1975: problem with wiki requiring cookies even if they are already allowed
--------------------+-------------------------------
Reporter: hellik | Owner: christian, sac@…
     Type: defect | Status: new
Priority: major | Milestone:
Component: Wiki | Resolution:
Keywords: |
--------------------+-------------------------------

Comment (by Jeff McKenna):

i have reset: session.referer_check = on

--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/1975#comment:9&gt;
OSGeo <http://www.osgeo.org/&gt;
OSGeo committee and general foundation issue tracker.

#1975: problem with wiki requiring cookies even if they are already allowed
--------------------+-------------------------------
Reporter: hellik | Owner: christian, sac@…
     Type: defect | Status: new
Priority: major | Milestone:
Component: Wiki | Resolution:
Keywords: |
--------------------+-------------------------------

Comment (by Jeff McKenna):

Here is the space available on that VM:

{{{
Filesystem Size Used Avail Use% Mounted on
/dev/vda3 16G 13G 2.3G 85% /
tmpfs 2.0G 0 2.0G 0% /lib/init/rw
udev 10M 112K 9.9M 2% /dev
tmpfs 2.0G 0 2.0G 0% /dev/shm
/dev/vda1 99M 25M 70M 27% /boot
}}}

Looks fine to me. Maybe someone is making space now as I type?

--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/1975#comment:10&gt;
OSGeo <http://www.osgeo.org/&gt;
OSGeo committee and general foundation issue tracker.

#1975: problem with wiki requiring cookies even if they are already allowed
--------------------+-------------------------------
Reporter: hellik | Owner: christian, sac@…
     Type: defect | Status: new
Priority: major | Milestone:
Component: Wiki | Resolution:
Keywords: |
--------------------+-------------------------------

Comment (by strk):

I hadn't touched the machine, and it looks like we're the only one who
logged in the last few hours
(but the wtmp is *really* short)

For the record, the received mail:
{{{
Date: Mon, 24 Jul 2017 06:25:28 -0700 (PDT)
From: Cron Daemon <root@osgeo.org>
Subject: Cron <root@wiki> test -x /usr/sbin/anacron || ( cd / && run-parts
--report /etc/cron.daily
         ) (failed)

/etc/cron.daily/man-db:
/usr/bin/mandb: can't write to /var/cache/man/30183: No space left on
device
run-parts: /etc/cron.daily/man-db exited with return code 2
}}}

--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/1975#comment:11&gt;
OSGeo <http://www.osgeo.org/&gt;
OSGeo committee and general foundation issue tracker.

#1975: problem with wiki requiring cookies even if they are already allowed
--------------------+-------------------------------
Reporter: hellik | Owner: christian, sac@…
     Type: defect | Status: new
Priority: major | Milestone:
Component: Wiki | Resolution:
Keywords: |
--------------------+-------------------------------

Comment (by Jeff McKenna):

for now the initial fix of 'session.referer_check = off' is working.
until we find a better one :slight_smile:

--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/1975#comment:12&gt;
OSGeo <http://www.osgeo.org/&gt;
OSGeo committee and general foundation issue tracker.

#1975: problem with wiki requiring cookies even if they are already allowed
--------------------+-------------------------------
Reporter: hellik | Owner: christian, sac@…
     Type: defect | Status: closed
Priority: major | Milestone:
Component: Wiki | Resolution: fixed
Keywords: |
--------------------+-------------------------------
Changes (by strk):

* status: new => closed
* resolution: => fixed

Comment:

I confirm it is working, although documentation seems to suggest the value
of that variable should be a substring to be found in the HTTP_REFERER:
http://php.net/manual/en/session.configuration.php#ini.session.referer-
check

BTW, it's documented to default to the empty string

The file /etc/php5/apache2/php.ini is not part of the libapache2-mod-php5
package, so I wonder how it got there in the first place.

Now the directory is under a local git repository (for the future)

--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/1975#comment:13&gt;
OSGeo <http://www.osgeo.org/&gt;
OSGeo committee and general foundation issue tracker.