Make ChronologyProtector actually use cpPosTime cookies
authorAaron Schulz <aschulz@wikimedia.org>
Wed, 29 Nov 2017 02:40:04 +0000 (18:40 -0800)
committerAaron Schulz <aschulz@wikimedia.org>
Thu, 30 Nov 2017 22:26:57 +0000 (22:26 +0000)
commitc46fa4c474035779cd8b4a961f0f6941ef102a1c
tree7916b53a6b630c07c4016cd1f5a7722a9faac054
parent1f36c773531a5c15669d0057c08b2281765d01ca
Make ChronologyProtector actually use cpPosTime cookies

Setup.php was only injected the value from $_GET. LBFactory used
to check both before 0e5cd18b74d83c50, with the cookie check left
in LBFactoryMW. After d175b391ae2a7, LBFactoryMW class switched to
the default LBFactory method for making a ChronologyProtector
instance, so the cookie check was lost there too.

This means that an HTTP GET request due to a redirect from a POST
request will still make sure the DB position store is up-to-date.
This only matters is that store uses replication (e.g. cross DC).

Also refactor LBFactory handling of the cpPosTime URL parameter.

Change-Id: Ie5744577609f4c193cacd71334f92b30f02e3846
includes/Setup.php
includes/libs/rdbms/lbfactory/ILBFactory.php
includes/libs/rdbms/lbfactory/LBFactory.php