7285bff717ed9e9c5dbbcb0a354d6b81e3876714
[Packages/TYPO3.CMS.git] / typo3 / sysext / openid / Classes / OpenidService.php
1 <?php
2 namespace TYPO3\CMS\Openid;
3
4 /***************************************************************
5 * Copyright notice
6 *
7 * (c) 2008-2013 Dmitry Dulepov <dmitry@typo3.org>
8 * All rights reserved
9 *
10 * This script is part of the TYPO3 project. The TYPO3 project is
11 * free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
15 *
16 * The GNU General Public License can be found at
17 * http://www.gnu.org/copyleft/gpl.html.
18 *
19 * This script is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * This copyright notice MUST APPEAR in all copies of the script!
25 ***************************************************************/
26
27 require_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('openid') . 'lib/php-openid/Auth/OpenID/Interface.php';
28
29 /**
30 * Service "OpenID Authentication" for the "openid" extension.
31 *
32 * @author Dmitry Dulepov <dmitry@typo3.org>
33 */
34 class OpenidService extends \TYPO3\CMS\Core\Service\AbstractService {
35
36 /**
37 * Class name
38 */
39 public $prefixId = 'tx_openid_sv1';
40
41 // Same as class name
42 /**
43 * Path to this script relative to the extension directory
44 */
45 public $scriptRelPath = 'sv1/class.tx_openid_sv1.php';
46
47 /**
48 * The extension key
49 */
50 public $extKey = 'openid';
51
52 /**
53 * Login data as passed to initAuth()
54 */
55 protected $loginData = array();
56
57 /**
58 * Additional authentication information provided by \TYPO3\CMS\Core\Authentication\AbstractUserAuthentication.
59 * We use it to decide what database table contains user records.
60 */
61 protected $authenticationInformation = array();
62
63 /**
64 * OpenID identifier after it has been normalized.
65 */
66 protected $openIDIdentifier;
67
68 /**
69 * OpenID response object. It is initialized when OpenID provider returns
70 * with success/failure response to us.
71 *
72 * @var \Auth_OpenID_ConsumerResponse
73 */
74 protected $openIDResponse = NULL;
75
76 /**
77 * A reference to the calling object
78 *
79 * @var \TYPO3\CMS\Core\Authentication\AbstractUserAuthentication
80 */
81 protected $parentObject;
82
83 /**
84 * If set to TRUE, than libraries are already included.
85 */
86 static protected $openIDLibrariesIncluded = FALSE;
87
88 /**
89 * Contructs the OpenID authentication service.
90 */
91 public function __construct() {
92 // Auth_Yadis_Yadis::getHTTPFetcher() will use a cURL fetcher if the functionality
93 // is available in PHP, however the TYPO3 setting is not considered here:
94 if (!defined('Auth_Yadis_CURL_OVERRIDE')) {
95 if (!$GLOBALS['TYPO3_CONF_VARS']['SYS']['curlUse']) {
96 define('Auth_Yadis_CURL_OVERRIDE', TRUE);
97 }
98 }
99 }
100
101 /**
102 * Checks if service is available,. In case of this service we check that
103 * prerequesties for "PHP OpenID" libraries are fulfilled:
104 * - GMP or BCMATH PHP extensions are installed and functional
105 * - set_include_path() PHP function is available
106 *
107 * @return boolean TRUE if service is available
108 */
109 public function init() {
110 $available = FALSE;
111 if (extension_loaded('gmp')) {
112 $available = is_callable('gmp_init');
113 } elseif (extension_loaded('bcmath')) {
114 $available = is_callable('bcadd');
115 } else {
116 $this->writeLog('Neither bcmath, nor gmp PHP extension found. OpenID authentication will not be available.');
117 }
118 // We also need set_include_path() PHP function
119 if (!is_callable('set_include_path')) {
120 $available = FALSE;
121 $this->writeLog('set_include_path() PHP function is not available. OpenID authentication is disabled.');
122 }
123 return $available ? parent::init() : FALSE;
124 }
125
126 /**
127 * Initializes authentication for this service.
128 *
129 * @param string $subType: Subtype for authentication (either "getUserFE" or "getUserBE")
130 * @param array $loginData: Login data submitted by user and preprocessed by AbstractUserAuthentication
131 * @param array $authenticationInformation: Additional TYPO3 information for authentication services (unused here)
132 * @param \TYPO3\CMS\Core\Authentication\AbstractUserAuthentication $parentObject Calling object
133 * @return void
134 */
135 public function initAuth($subType, array $loginData, array $authenticationInformation, \TYPO3\CMS\Core\Authentication\AbstractUserAuthentication &$parentObject) {
136 // Store login and authetication data
137 $this->loginData = $loginData;
138 $this->authenticationInformation = $authenticationInformation;
139 // Implement normalization according to OpenID 2.0 specification
140 $this->openIDIdentifier = $this->normalizeOpenID($this->loginData['uname']);
141 // If we are here after authentication by the OpenID server, get its response.
142 if (\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('tx_openid_mode') == 'finish' && $this->openIDResponse == NULL) {
143 $this->includePHPOpenIDLibrary();
144 $openIDConsumer = $this->getOpenIDConsumer();
145 $this->openIDResponse = $openIDConsumer->complete($this->getReturnURL());
146 }
147 $this->parentObject = $parentObject;
148 }
149
150 /**
151 * This function returns the user record back to the \TYPO3\CMS\Core\Authentication\AbstractUserAuthentication.
152 * It does not mean that user is authenticated, it means only that user is found. This
153 * function makes sure that user cannot be authenticated by any other service
154 * if user tries to use OpenID to authenticate.
155 *
156 * @return mixed User record (content of fe_users/be_users as appropriate for the current mode)
157 */
158 public function getUser() {
159 $userRecord = NULL;
160 if ($this->loginData['status'] == 'login') {
161 if ($this->openIDResponse instanceof \Auth_OpenID_ConsumerResponse) {
162 $GLOBALS['BACK_PATH'] = $this->getBackPath();
163 // We are running inside the OpenID return script
164 // Note: we cannot use $this->openIDResponse->getDisplayIdentifier()
165 // because it may return a different identifier. For example,
166 // LiveJournal server converts all underscore characters in the
167 // original identfier to dashes.
168 if ($this->openIDResponse->status == Auth_OpenID_SUCCESS) {
169 $openIDIdentifier = $this->getFinalOpenIDIdentifier();
170 if ($openIDIdentifier) {
171 $userRecord = $this->getUserRecord($openIDIdentifier);
172 if ($userRecord != NULL) {
173 $this->writeLog('User \'%s\' logged in with OpenID \'%s\'', $userRecord[$this->parentObject->formfield_uname], $openIDIdentifier);
174 } else {
175 $this->writeLog('Failed to login user using OpenID \'%s\'', $openIDIdentifier);
176 }
177 }
178 }
179 } else {
180 // Here if user just started authentication
181 $userRecord = $this->getUserRecord($this->openIDIdentifier);
182 }
183 // The above function will return user record from the OpenID. It means that
184 // user actually tried to authenticate using his OpenID. In this case
185 // we must change the password in the record to a long random string so
186 // that this user cannot be authenticated with other service.
187 if (is_array($userRecord)) {
188 $userRecord[$this->authenticationInformation['db_user']['userident_column']] = uniqid($this->prefixId . LF, TRUE);
189 }
190 }
191 return $userRecord;
192 }
193
194 /**
195 * Authenticates user using OpenID.
196 *
197 * @param array $userRecord User record
198 * @return int Code that shows if user is really authenticated.
199 */
200 public function authUser(array $userRecord) {
201 $result = 100;
202 // 100 means "we do not know, continue"
203 if ($userRecord['tx_openid_openid'] !== '') {
204 // Check if user is identified by the OpenID
205 if ($this->openIDResponse instanceof \Auth_OpenID_ConsumerResponse) {
206 // If we have a response, it means OpenID server tried to authenticate
207 // the user. Now we just look what is the status and provide
208 // corresponding response to the caller
209 if ($this->openIDResponse->status == Auth_OpenID_SUCCESS) {
210 // Success (code 200)
211 $result = 200;
212 } else {
213 $this->writeLog('OpenID authentication failed with code \'%s\'.', $this->openIDResponse->status);
214 }
215 } else {
216 // We may need to send a request to the OpenID server.
217 // First, check if the supplied login name equals with the configured OpenID.
218 if ($this->openIDIdentifier == $userRecord['tx_openid_openid']) {
219 // Next, check if the user identifier looks like an OpenID identifier.
220 // Prevent PHP warning in case if identifiers is not an OpenID identifier
221 // (not an URL).
222 // TODO: Improve testing here. After normalization has been added, now all identifiers will succeed here...
223 $urlParts = @parse_url($this->openIDIdentifier);
224 if (is_array($urlParts) && $urlParts['scheme'] != '' && $urlParts['host']) {
225 // Yes, this looks like a good OpenID. Ask OpenID server (should not return)
226 $this->sendOpenIDRequest();
227 }
228 }
229 }
230 }
231 return $result;
232 }
233
234 /**
235 * Includes necessary files for the PHP OpenID library
236 *
237 * @return void
238 */
239 protected function includePHPOpenIDLibrary() {
240 if (!self::$openIDLibrariesIncluded) {
241 // Prevent further calls
242 self::$openIDLibrariesIncluded = TRUE;
243 // PHP OpenID libraries requires adjustments of path settings
244 $oldIncludePath = get_include_path();
245 $phpOpenIDLibPath = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('openid') . 'lib/php-openid';
246 @set_include_path(($phpOpenIDLibPath . PATH_SEPARATOR . $phpOpenIDLibPath . PATH_SEPARATOR . 'Auth' . PATH_SEPARATOR . $oldIncludePath));
247 // Make sure that random generator is properly set up. Constant could be
248 // defined by the previous inclusion of the file
249 if (!defined('Auth_OpenID_RAND_SOURCE')) {
250 if (TYPO3_OS == 'WIN') {
251 // No random generator on Windows!
252 define('Auth_OpenID_RAND_SOURCE', NULL);
253 } elseif (!is_readable('/dev/urandom')) {
254 if (is_readable('/dev/random')) {
255 define('Auth_OpenID_RAND_SOURCE', '/dev/random');
256 } else {
257 define('Auth_OpenID_RAND_SOURCE', NULL);
258 }
259 }
260 }
261 // Include files
262 require_once $phpOpenIDLibPath . '/Auth/OpenID/Consumer.php';
263 // Restore path
264 @set_include_path($oldIncludePath);
265 if (!is_array($_SESSION)) {
266 // Yadis requires session but session is not initialized when
267 // processing Backend authentication
268 @session_start();
269 $this->writeLog('Session is initialized');
270 }
271 }
272 }
273
274 /**
275 * Gets user record for the user with the OpenID provided by the user
276 *
277 * @param string $openIDIdentifier OpenID identifier to search for
278 * @return array Database fields from the table that corresponds to the current login mode (FE/BE)
279 */
280 protected function getUserRecord($openIDIdentifier) {
281 $record = NULL;
282 if ($openIDIdentifier) {
283 // $openIDIdentifier always as a trailing slash because it got normalized
284 // but tx_openid_openid possibly not so check for both alternatives in database
285 $record = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow('*', $this->authenticationInformation['db_user']['table'], 'tx_openid_openid IN (' . $GLOBALS['TYPO3_DB']->fullQuoteStr($openIDIdentifier, $this->authenticationInformation['db_user']['table']) . ',' . $GLOBALS['TYPO3_DB']->fullQuoteStr(rtrim($openIDIdentifier, '/'), $this->authenticationInformation['db_user']['table']) . ')' . $this->authenticationInformation['db_user']['check_pid_clause'] . $this->authenticationInformation['db_user']['enable_clause']);
286 if ($record) {
287 // Make sure to work only with normalized OpenID during the whole process
288 $record['tx_openid_openid'] = $this->normalizeOpenID($record['tx_openid_openid']);
289 }
290 } else {
291 // This should never happen and generally means hack attempt.
292 // We just log it and do not return any records.
293 $this->writeLog('getUserRecord is called with the empty OpenID');
294 }
295 return $record;
296 }
297
298 /**
299 * Creates OpenID Consumer object with a TYPO3-specific store. This function
300 * is almost identical to the example from the PHP OpenID library.
301 *
302 * @todo use DB (or the caching framework) instead of the filesystem to store OpenID data
303 * @return Auth_OpenID_Consumer Consumer instance
304 */
305 protected function getOpenIDConsumer() {
306 $openIDStore = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Openid\\OpenidStore');
307 /* @var $openIDStore tx_openid_store */
308 $openIDStore->cleanup();
309 return new \Auth_OpenID_Consumer($openIDStore);
310 }
311
312 /**
313 * Sends request to the OpenID server to authenticate the user with the
314 * given ID. This function is almost identical to the example from the PHP
315 * OpenID library. Due to the OpenID specification we cannot do a slient login.
316 * Sometimes we have to redirect to the OpenID provider web site so that
317 * user can enter his password there. In this case we will redirect and provide
318 * a return adress to the special script inside this directory, which will
319 * handle the result appropriately.
320 *
321 * This function does not return on success. If it returns, it means something
322 * went totally wrong with OpenID.
323 *
324 * @return void
325 */
326 protected function sendOpenIDRequest() {
327 $this->includePHPOpenIDLibrary();
328 $openIDIdentifier = $this->openIDIdentifier;
329 // Initialize OpenID client system, get the consumer
330 $openIDConsumer = $this->getOpenIDConsumer();
331 // Begin the OpenID authentication process
332 $authenticationRequest = $openIDConsumer->begin($openIDIdentifier);
333 if (!$authenticationRequest) {
334 // Not a valid OpenID. Since it can be some other ID, we just return
335 // and let other service handle it.
336 $this->writeLog('Could not create authentication request for OpenID identifier \'%s\'', $openIDIdentifier);
337 return;
338 }
339 // Redirect the user to the OpenID server for authentication.
340 // Store the token for this authentication so we can verify the
341 // response.
342 // For OpenID version 1, we *should* send a redirect. For OpenID version 2,
343 // we should use a Javascript form to send a POST request to the server.
344 $returnURL = $this->getReturnURL();
345 $trustedRoot = \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SITE_URL');
346 if ($authenticationRequest->shouldSendRedirect()) {
347 $redirectURL = $authenticationRequest->redirectURL($trustedRoot, $returnURL);
348 // If the redirect URL can't be built, return. We can only return.
349 if (\Auth_OpenID::isFailure($redirectURL)) {
350 $this->writeLog('Authentication request could not create redirect URL for OpenID identifier \'%s\'', $openIDIdentifier);
351 return;
352 }
353 // Send redirect. We use 303 code because it allows to redirect POST
354 // requests without resending the form. This is exactly what we need here.
355 // See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.4
356 @ob_end_clean();
357 \TYPO3\CMS\Core\Utility\HttpUtility::redirect($redirectURL, \TYPO3\CMS\Core\Utility\HttpUtility::HTTP_STATUS_303);
358 } else {
359 $formHtml = $authenticationRequest->htmlMarkup($trustedRoot, $returnURL, FALSE, array('id' => 'openid_message'));
360 // Display an error if the form markup couldn't be generated;
361 // otherwise, render the HTML.
362 if (\Auth_OpenID::isFailure($formHtml)) {
363 // Form markup cannot be generated
364 $this->writeLog('Could not create form markup for OpenID identifier \'%s\'', $openIDIdentifier);
365 return;
366 } else {
367 @ob_end_clean();
368 echo $formHtml;
369 }
370 }
371 // If we reached this point, we must not return!
372 die;
373 }
374
375 /**
376 * Creates return URL for the OpenID server. When a user is authenticated by
377 * the OpenID server, the user will be sent to this URL to complete
378 * authentication process with the current site. We send it to our script.
379 *
380 * @return string Return URL
381 */
382 protected function getReturnURL() {
383 if ($this->authenticationInformation['loginType'] == 'FE') {
384 // We will use eID to send user back, create session data and
385 // return to the calling page.
386 // Notice: 'pid' and 'logintype' parameter names cannot be changed!
387 // They are essential for FE user authentication.
388 $returnURL = 'index.php?eID=tx_openid&' . 'pid=' . $this->authenticationInformation['db_user']['checkPidList'] . '&' . 'logintype=login&';
389 } else {
390 // In the Backend we will use dedicated script to create session.
391 // It is much easier for the Backend to manage users.
392 // Notice: 'login_status' parameter name cannot be changed!
393 // It is essential for BE user authentication.
394 $absoluteSiteURL = substr(\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SITE_URL'), strlen(\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_REQUEST_HOST')));
395 $returnURL = $absoluteSiteURL . TYPO3_mainDir . 'sysext/' . $this->extKey . '/class.tx_openid_return.php?login_status=login&';
396 }
397 if (\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('tx_openid_mode') == 'finish') {
398 $requestURL = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('tx_openid_location');
399 $claimedIdentifier = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('tx_openid_claimed');
400 } else {
401 $requestURL = \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_REQUEST_URL');
402 $claimedIdentifier = $this->openIDIdentifier;
403 }
404 $returnURL .= 'tx_openid_location=' . rawurlencode($requestURL) . '&' . 'tx_openid_mode=finish&' . 'tx_openid_claimed=' . rawurlencode($claimedIdentifier) . '&' . 'tx_openid_signature=' . $this->getSignature($claimedIdentifier);
405 return \TYPO3\CMS\Core\Utility\GeneralUtility::locationHeaderUrl($returnURL);
406 }
407
408 /**
409 * Signs claimed id.
410 *
411 * @param string $claimedIdentifier
412 * @return string
413 */
414 protected function getSignature($claimedIdentifier) {
415 // You can also increase security by using sha1 (beware of too long URLs!)
416 return md5(implode('/', array(
417 $claimedIdentifier,
418 strval(strlen($claimedIdentifier)),
419 $GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey']
420 )));
421 }
422
423 /**
424 * Implement normalization according to OpenID 2.0 specification
425 * See http://openid.net/specs/openid-authentication-2_0.html#normalization
426 *
427 * @param string $openIDIdentifier OpenID identifier to normalize
428 * @return string Normalized OpenID identifier
429 */
430 protected function normalizeOpenID($openIDIdentifier) {
431 // Strip everything with and behind the fragment delimiter character "#"
432 if (strpos($openIDIdentifier, '#') !== FALSE) {
433 $openIDIdentifier = preg_replace('/#.*$/', '', $openIDIdentifier);
434 }
435 // A URI with a missing scheme is normalized to a http URI
436 if (!preg_match('#^https?://#', $openIDIdentifier)) {
437 $escapedIdentifier = $GLOBALS['TYPO3_DB']->quoteStr($openIDIdentifier, $this->authenticationInformation['db_user']['table']);
438 $condition = 'tx_openid_openid IN (' . '\'http://' . $escapedIdentifier . '\',' . '\'http://' . $escapedIdentifier . '/\',' . '\'https://' . $escapedIdentifier . '\',' . '\'https://' . $escapedIdentifier . '/\'' . ')';
439 $row = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow('tx_openid_openid', $this->authenticationInformation['db_user']['table'], $condition);
440 if (is_array($row)) {
441 $openIDIdentifier = $row['tx_openid_openid'];
442 }
443 }
444 // An empty path component is normalized to a slash
445 // (e.g. "http://domain.org" -> "http://domain.org/")
446 if (preg_match('#^https?://[^/]+$#', $openIDIdentifier)) {
447 $openIDIdentifier .= '/';
448 }
449 return $openIDIdentifier;
450 }
451
452 /**
453 * Calculates the path to the TYPO3 directory from the current directory
454 *
455 * @return string
456 */
457 protected function getBackPath() {
458 $extPath = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath('openid');
459 $segmentCount = count(explode('/', $extPath));
460 $path = str_pad('', $segmentCount * 3, '../') . TYPO3_mainDir;
461 return $path;
462 }
463
464 /**
465 * Obtains a real identifier for the user
466 *
467 * @return string
468 */
469 protected function getFinalOpenIDIdentifier() {
470 $result = $this->getSignedParameter('openid_identity');
471 if (!$result) {
472 $result = $this->getSignedParameter('openid_claimed_id');
473 }
474 if (!$result) {
475 $result = $this->getSignedClaimedOpenIDIdentifier();
476 }
477 $result = $this->getAdjustedOpenIDIdentifier($result);
478 return $result;
479 }
480
481 /**
482 * Gets the signed OpenID that was sent back to this service.
483 *
484 * @return string The signed OpenID, if signature did not match this is empty
485 */
486 protected function getSignedClaimedOpenIDIdentifier() {
487 $result = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('tx_openid_claimed');
488 $signature = $this->getSignature($result);
489 if ($signature !== \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('tx_openid_signature')) {
490 $result = '';
491 }
492 return $result;
493 }
494
495 /**
496 * Adjusts the OpenID identifier to to claimed OpenID, if the only difference
497 * is in normalizing the URLs. Example:
498 * + OpenID returned from provider: https://account.provider.net/
499 * + OpenID used in TYPO3: https://account.provider.net (not normalized)
500 *
501 * @param string $openIDIdentifier The OpenID returned by the OpenID provider
502 * @return string Adjusted OpenID identifier
503 */
504 protected function getAdjustedOpenIDIdentifier($openIDIdentifier) {
505 $result = '';
506 $claimedOpenIDIdentifier = $this->getSignedClaimedOpenIDIdentifier();
507 $pattern = '#^' . preg_quote($claimedOpenIDIdentifier, '#') . '/?$#';
508 if (preg_match($pattern, $openIDIdentifier)) {
509 $result = $claimedOpenIDIdentifier;
510 }
511 return $result;
512 }
513
514 /**
515 * Obtains a value of the parameter if it is signed. If not signed, then
516 * empty string is returned.
517 *
518 * @param string $parameterName Must start with 'openid_'
519 * @return string
520 */
521 protected function getSignedParameter($parameterName) {
522 $signedParametersList = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('openid_signed');
523 if (\TYPO3\CMS\Core\Utility\GeneralUtility::inList($signedParametersList, substr($parameterName, 7))) {
524 $result = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP($parameterName);
525 } else {
526 $result = '';
527 }
528 return $result;
529 }
530
531 /**
532 * Writes log message. Destination log depends on the current system mode.
533 * For FE the function writes to the admin panel log. For BE messages are
534 * sent to the system log. If developer log is enabled, messages are also
535 * sent there.
536 *
537 * This function accepts variable number of arguments and can format
538 * parameters. The syntax is the same as for sprintf()
539 *
540 * @param string $message Message to output
541 * @return void
542 * @see sprintf()
543 * @see t3lib::divLog()
544 * @see \TYPO3\CMS\Core\Utility\GeneralUtility::sysLog()
545 * @see t3lib_timeTrack::setTSlogMessage()
546 */
547 protected function writeLog($message) {
548 if (func_num_args() > 1) {
549 $params = func_get_args();
550 array_shift($params);
551 $message = vsprintf($message, $params);
552 }
553 if (TYPO3_MODE == 'BE') {
554 \TYPO3\CMS\Core\Utility\GeneralUtility::sysLog($message, $this->extKey, \TYPO3\CMS\Core\Utility\GeneralUtility::SYSLOG_SEVERITY_NOTICE);
555 } else {
556 $GLOBALS['TT']->setTSlogMessage($message);
557 }
558 if ($GLOBALS['TYPO3_CONF_VARS']['SYS']['enable_DLOG']) {
559 \TYPO3\CMS\Core\Utility\GeneralUtility::devLog($message, $this->extKey, \TYPO3\CMS\Core\Utility\GeneralUtility::SYSLOG_SEVERITY_NOTICE);
560 }
561 }
562
563 }
564
565
566 ?>