Project

General

Profile

Actions

Bug #23091

closed

Use TYPO3_REQUESTTYPE consistently for CLI calls detection

Added by Francois Suter over 14 years ago. Updated over 13 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2010-07-03
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.4
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Throughout the core, a CLI call is identified using the following test:

defined('TYPO3_cliMode') && TYPO3_cliMode

although t3lib/config_default.php harmonizes all request types into a single constant called TYPO3_REQUESTTYPE. This means the above test can be replaced by:

TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_CLI

to be consistent.

An exception is 2 t3lib_div methods, because we cannot be sure that t3lib/config_default.php has been called beforehand, so TYPO3_REQUESTTYPE may not be defined.

(issue imported from #M14989)


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #23095: Use TYPO3_REQUESTTYPE also for Install Tool accessClosedFrancois Suter2010-07-04

Actions
Actions #1

Updated by Francois Suter over 14 years ago

Here are all the possible scenarios to test the patch:

- call the CLI dispatcher with an invalid CLI key => should still fail
- create file typo3conf/LOCK_BACKEND and:
-- run a CLI script => should still run
-- access the BE => should still be locked
- set some $TYPO3_CONF_VARS['BE']['IPmaskList'] that does not match your IP and:
-- run a CLI script => should still run
-- access the BE => should still show an error
- set $TYPO3_CONF_VARS['BE']['lockSSL'] to 1, 2 or 3 and:
-- access to the BE => should redirect to HTTPS as expected
-- run a CLI script => should be unaffected
- run a CLI script => should not see any error about browser compatibility
- run a CLI script with the "status" argument added => should still display the status (in case anyone ever saw that in his life)
- run the scheduler from the command-line and:
-- it should still run :-)
-- check the BE module => the latest execution should be shown as being from "Cron"
- try to log into the BE with a cli* user => should still result in an exception
- set $GLOBALS['TYPO3_CONF_VARS']['BE']['adminOnly'] = 1 and try to run a CLI script => should still fail
- set $GLOBALS['TYPO3_CONF_VARS']['BE']['adminOnly'] = 2 and:
-- run a CLI script => should still be allowed
-- log into the BE with an admin user => should still be allowed
-- log into the BE with a non-admin user => should still fail

Actions #2

Updated by Thorsten Kahler over 14 years ago

I've run all mentioned tests successful.

Actions #3

Updated by Francois Suter over 14 years ago

Committed to trunk in revision 8084.

Actions #4

Updated by Susanne Moog over 13 years ago

  • Target version deleted (4.5.0)
Actions

Also available in: Atom PDF