Created
October 16, 2014 06:22
-
-
Save danreb/d6c85637ead57fcda287 to your computer and use it in GitHub Desktop.
Do a find and replace to apply the patch for SA-CORE-2014-005 - Drupal core - SQL injection
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
find . -type f -name "database.inc" -exec sed -i 's/foreach ($data as $i => $value) {/foreach (array_values($data) as $i => $value) {/g' {} \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
HOW TO USE?
Create a shell script file in your Linux server e.g "sql-injection-patcher.sh" and copy the code above.
touch sql-injection-patcher.sh
Add execute permission to script using CHMOD command
chmod +x sql-injection-patcher.sh
Execute the script
sh sql-injection-patcher.sh
ENJOY!