Page MenuHomeIn-Portal Phabricator

INP-1928 - Automatic Scheduled Task creation protection
AcceptedPublic

Authored by alex on Thu, Oct 23, 10:31 AM.

Details

Reviewers
erik
Test Plan

Part 1 (testing with path applied)

  • in Admin Console:
    1. login to the Admin Console
    2. go to the ConfigurationWebsiteScheduled Tasks section
    3. delete any scheduled task, but remember which one
  • in DB:
    1. rename any of the non-critical DB columns (e.g. SiteDomainLimitation) in the ScheduledTasks table by adding _ in front of it's name
  • in Admin Console:
    1. go to the ToolsSystem Tools section
    2. trigger Unit Config Cache rebuild by using the Reset button under the Reset Parsed and Cached System Data heading
    3. go to the ConfigurationWebsiteScheduled Tasks section
    4. confirm, that previously deleted scheduled task record was recreated
    5. restore original name of the above-renamed column

Part 2 (testing without patch applied)

  1. revert the patch, that was applied
  2. repeat the Part 1 plan
  3. (instead of original confirm, ...) confirm, that you'll get an exception about attempt use an absent column in the ScheduledTasks DB table

Diff Detail

Repository
rINP In-Portal
Branch
branches/5.2.x
Lint
Lint ErrorsExcuse: Not fixing.
SeverityLocationCodeMessage
Errorcore/units/scheduled_tasks/scheduled_task_item.php:2PHPCS.E.CodingStandard.Commenting.DocComment.MissingShortCodingStandard.Commenting.DocComment.MissingShort
Errorcore/units/scheduled_tasks/scheduled_task_item.php:3PHPCS.E.CodingStandard.Commenting.DocComment.TagValueIndentCodingStandard.Commenting.DocComment.TagValueIndent
Errorcore/units/scheduled_tasks/scheduled_task_item.php:3PHPCS.E.Squiz.Commenting.DocCommentAlignment.SpaceBeforeStarSquiz.Commenting.DocCommentAlignment.SpaceBeforeStar
Errorcore/units/scheduled_tasks/scheduled_task_item.php:4PHPCS.E.CodingStandard.Commenting.DocComment.TagValueIndentCodingStandard.Commenting.DocComment.TagValueIndent
Errorcore/units/scheduled_tasks/scheduled_task_item.php:4PHPCS.E.Squiz.Commenting.DocCommentAlignment.SpaceBeforeStarSquiz.Commenting.DocCommentAlignment.SpaceBeforeStar
Errorcore/units/scheduled_tasks/scheduled_task_item.php:5PHPCS.E.CodingStandard.Commenting.DocComment.TagValueIndentCodingStandard.Commenting.DocComment.TagValueIndent
Errorcore/units/scheduled_tasks/scheduled_task_item.php:5PHPCS.E.Squiz.Commenting.DocCommentAlignment.SpaceBeforeStarSquiz.Commenting.DocCommentAlignment.SpaceBeforeStar
Errorcore/units/scheduled_tasks/scheduled_task_item.php:6PHPCS.E.CodingStandard.Commenting.DocComment.TagValueIndentCodingStandard.Commenting.DocComment.TagValueIndent
Errorcore/units/scheduled_tasks/scheduled_task_item.php:6PHPCS.E.Squiz.Commenting.DocCommentAlignment.SpaceBeforeStarSquiz.Commenting.DocCommentAlignment.SpaceBeforeStar
Errorcore/units/scheduled_tasks/scheduled_task_item.php:7PHPCS.E.Squiz.Commenting.DocCommentAlignment.SpaceBeforeStarSquiz.Commenting.DocCommentAlignment.SpaceBeforeStar
Errorcore/units/scheduled_tasks/scheduled_task_item.php:8PHPCS.E.Squiz.Commenting.DocCommentAlignment.SpaceBeforeStarSquiz.Commenting.DocCommentAlignment.SpaceBeforeStar
Errorcore/units/scheduled_tasks/scheduled_task_item.php:9PHPCS.E.Squiz.Commenting.DocCommentAlignment.SpaceBeforeStarSquiz.Commenting.DocCommentAlignment.SpaceBeforeStar
Errorcore/units/scheduled_tasks/scheduled_task_item.php:10PHPCS.E.Squiz.Commenting.DocCommentAlignment.SpaceBeforeStarSquiz.Commenting.DocCommentAlignment.SpaceBeforeStar
Errorcore/units/scheduled_tasks/scheduled_task_item.php:11PHPCS.E.Squiz.Commenting.DocCommentAlignment.SpaceBeforeStarSquiz.Commenting.DocCommentAlignment.SpaceBeforeStar
Errorcore/units/scheduled_tasks/scheduled_task_item.php:12PHPCS.E.Squiz.Commenting.DocCommentAlignment.SpaceBeforeStarSquiz.Commenting.DocCommentAlignment.SpaceBeforeStar
Errorcore/units/scheduled_tasks/scheduled_task_item.php:13PHPCS.E.Squiz.Commenting.DocCommentAlignment.SpaceBeforeStarSquiz.Commenting.DocCommentAlignment.SpaceBeforeStar
Errorcore/units/scheduled_tasks/scheduled_tasks_config.php:19PHPCS.E.CodingStandard.Arrays.Array.SpaceAfterKeywordCodingStandard.Arrays.Array.SpaceAfterKeyword
Errorcore/units/scheduled_tasks/scheduled_tasks_config.php:19PHPCS.E.Generic.PHP.LowerCaseKeyword.FoundGeneric.PHP.LowerCaseKeyword.Found
Errorcore/units/scheduled_tasks/scheduled_tasks_config.php:20PHPCS.E.CodingStandard.Arrays.Array.SpaceAfterKeywordCodingStandard.Arrays.Array.SpaceAfterKeyword
Errorcore/units/scheduled_tasks/scheduled_tasks_config.php:20PHPCS.E.Generic.PHP.LowerCaseKeyword.FoundGeneric.PHP.LowerCaseKeyword.Found
Errorcore/units/traits/TDatabaseTableValidatorItemFeature.php:2PHPCS.E.CodingStandard.Commenting.DocComment.MissingShortCodingStandard.Commenting.DocComment.MissingShort
Errorcore/units/traits/TDatabaseTableValidatorItemFeature.php:3PHPCS.E.CodingStandard.Commenting.DocComment.TagValueIndentCodingStandard.Commenting.DocComment.TagValueIndent
Errorcore/units/traits/TDatabaseTableValidatorItemFeature.php:4PHPCS.E.CodingStandard.Commenting.DocComment.TagValueIndentCodingStandard.Commenting.DocComment.TagValueIndent
Errorcore/units/traits/TDatabaseTableValidatorItemFeature.php:5PHPCS.E.CodingStandard.Commenting.DocComment.TagValueIndentCodingStandard.Commenting.DocComment.TagValueIndent
Errorcore/units/traits/TDatabaseTableValidatorItemFeature.php:6PHPCS.E.CodingStandard.Commenting.DocComment.TagValueIndentCodingStandard.Commenting.DocComment.TagValueIndent
Unit
No Unit Test Coverage
Build Status
Buildable 11159
Build 3859: arc lint + arc unit

Event Timeline

alex created this revision.Thu, Oct 23, 10:31 AM
alex requested review of this revision.Thu, Oct 23, 10:31 AM
erik accepted this revision.Thu, Oct 23, 10:45 AM
This revision is now accepted and ready to land.Thu, Oct 23, 10:45 AM