Skip to content

Instantly share code, notes, and snippets.

@alsanchez
Created July 23, 2024 06:40
Show Gist options
  • Save alsanchez/4dadca3e4e36363b8872df96806d1a3d to your computer and use it in GitHub Desktop.
Save alsanchez/4dadca3e4e36363b8872df96806d1a3d to your computer and use it in GitHub Desktop.
CVE-2024-34102 patcher
export DRYRUN="--dry-run"
if [ -n "${CONFIRM}" ]
then
export DRYRUN=""
fi
patch -p1 $DRYRUN << EOF
diff --git a/app/bootstrap.php b/app/bootstrap.php
--- a/app/bootstrap.php
+++ b/app/bootstrap.php
@@ -4,6 +4,12 @@
* See COPYING.txt for license details.
*/
+if (strpos(file_get_contents('php://input'), 'dataIsURL') !== false) {
+ header('HTTP/1.1 503 Service Temporarily Unavailable');
+ header('Status: 503 Service Temporarily Unavailable');
+ exit;
+}
+
/**
* Environment initialization
*/
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment