Project

General

Profile

Actions

Bug #43900

closed

Deactivate deprecation_*.log when enableDeprecationLog settings has an invalid value

Added by Michael Schams almost 12 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2012-12-12
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
4.5
PHP Version:
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:

Description

Invalid value "1" in InstallTool (option: enableDeprecationLog) causes TYPO3 to write deprecation_*.log
Correct behaviour would be not to write anything if the system has been configured incorrectly.

In detail:

InstallTool -> show all configuration -> locate "enableDeprecationLog". Text reads:

Commalist: Enables the logging of deprecated methods and functions. Default is 'file'. The following options are allowed: file [...], devlog [...], console [...]

However, if the value "1" is used (which is an invalid value for enableDeprecationLog according to the text above and the documentation), TYPO3 writes typo3conf/deprecation_[HASH].log

Under normal circumstances, falling back to a specific (or safe) value is legitimate, if the system is misconfigured - but in this case, TYPO3 fills up the disk space if the deprecation_*.log is written, which introduces a risk for some sites (depending on extensions used and individual configuration).

Therefore, using an invalid value for the enableDeprecationLog setting should not write anything.


Files

issue-43900.diff (5.69 KB) issue-43900.diff patch for issue #43900 Michael Schams, 2013-04-28 07:03
Actions #1

Updated by Tobias Liebig almost 12 years ago

  • Status changed from New to On Hold
  • Complexity set to easy

The code at TYPO3\CMS\Core\Utility\GeneralUtility:deprecationLog explicity checks for the value '1' or TRUE and tread that like "file".
I think it's a valid behavior, when setting the configuration to /something true-ish/ (like '1') to enable the deprecation logging.
If a user want's to disable the logging, he most likely will set the configuration to '0', FALSE or remove it completely.

Actions #2

Updated by Markus Klein over 11 years ago

@Tobias: Why is this "on hold"?

I agree with Michael that the Core should behave as it is specified in the configuration description.

Actions #3

Updated by Markus Klein over 11 years ago

I would change that only in master, though.

Actions #4

Updated by Gerrit Code Review over 11 years ago

  • Status changed from On Hold to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/18510

Actions #5

Updated by Michael Schams over 11 years ago

I suspect, the code still does not match with the configuration description perfectly. However, the code change makes sense to me. The attached patch updates the description text and makes the check, which type of logging is set, more robust.

The patch is based on the current master (which is typo3_src-6.1.0rc1), so has been created on top of Change-Id: I04164270ea3359014b6637d6c68cf2d9348356b0.

Actions #6

Updated by Gerrit Code Review over 11 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/18510

Actions #7

Updated by Gerrit Code Review over 11 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/18510

Actions #8

Updated by Gerrit Code Review over 11 years ago

Patch set 4 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/18510

Actions #9

Updated by Gerrit Code Review over 11 years ago

Patch set 5 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/18510

Actions #10

Updated by Gerrit Code Review over 11 years ago

Patch set 6 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/18510

Actions #11

Updated by Anonymous over 11 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #12

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF