Enforce no-session constraint in opensearch_desc.php and profileinfo.php
authorBrad Jorsch <bjorsch@wikimedia.org>
Wed, 3 Oct 2018 19:07:24 +0000 (15:07 -0400)
committerBrad Jorsch <bjorsch@wikimedia.org>
Wed, 3 Oct 2018 19:08:06 +0000 (15:08 -0400)
Attempts to use session data via these endpoints will now cause
exceptions to be thrown.

Bug: T127233
Change-Id: I28b080a84e7b928e4336a5a1ec770bb57b05d009

opensearch_desc.php
profileinfo.php

index b9b2161..bd3281a 100644 (file)
@@ -21,9 +21,8 @@
  */
 
 // This endpoint is supposed to be independent of request cookies and other
-// details of the session. Log warnings for violations of the no-session
-// constraint.
-define( 'MW_NO_SESSION', 'warn' );
+// details of the session. Enforce this constraint with respect to session use.
+define( 'MW_NO_SESSION', 1 );
 
 require_once __DIR__ . '/includes/WebStart.php';
 
index 0a60b08..c65f952 100644 (file)
@@ -37,9 +37,8 @@
  */
 
 // This endpoint is supposed to be independent of request cookies and other
-// details of the session. Log warnings for violations of the no-session
-// constraint.
-define( 'MW_NO_SESSION', 'warn' );
+// details of the session. Enforce this constraint with respect to session use.
+define( 'MW_NO_SESSION', 1 );
 
 ini_set( 'zlib.output_compression', 'off' );