Skip to content

Commit

Permalink
Fix: sanitize migration param url (#7634)
Browse files Browse the repository at this point in the history
Co-authored-by: Jon Waldstein <[email protected]>
  • Loading branch information
jonwaldstein and Jon Waldstein authored Dec 3, 2024
1 parent a20c9d8 commit 4fb99af
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Framework/Migrations/Controllers/ManualMigration.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,17 @@ public function __construct(MigrationsRegister $migrationsRegister)
}

/**
* @unreleased sanitize params
* @since 2.9.2
*/
public function __invoke()
{
if ( ! empty($_GET['give-run-migration'])) {
$migrationToRun = $_GET['give-run-migration'];
$migrationToRun = give_clean($_GET['give-run-migration']);
}

if ( ! empty($_GET['give-clear-update'])) {
$migrationToClear = $_GET['give-clear-update'];
$migrationToClear = give_clean($_GET['give-clear-update']);
}

$hasMigration = isset($migrationToRun) || isset($migrationToClear);
Expand Down

0 comments on commit 4fb99af

Please sign in to comment.