define('CLI') should bypass auth_setup() in init.php
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mahara |
Fix Released
|
Low
|
Aaron Wells |
Bug Description
If you create a command-line script as described on https:/
I think this has gone unnoticed because the two existing CLI scripts in Mahara core both also use define(
Sample script to demonstrate this problem:
<?php
define('CLI', 1);
define('INTERNAL', 1);
define('ADMIN', 1);
require(
require(
cli::cli_
Expected Result: When executed via the command-line, it should print "Hello" and quit
Actual Result: It prints a terminal full of the HTML for the Mahara login page and dies.
Changed in mahara: | |
status: | In Progress → Fix Released |
Was initially pushed as a patch for 1.6: https:/ /reviews. mahara. org/#/c/ 2024/
I've abandoned that one and submitted a patch for 1.7 instead: https:/ /reviews. mahara. org/2066