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
| From 26a7752c34321fd9cb889308f507ca6bdb777f08 Mon Sep 17 00:00:00 2001 | |
| From: David Rothstein | |
| Date: Wed, 15 Oct 2014 14:31:54 +0000 | |
| Subject: SA-CORE-2014-005 by Stefan Horst, greggles, larowlan, David_Rothstein, klausi: Fixed SQL injection vulnerability | |
| --- | |
| diff --git a/includes/database/database.inc b/includes/database/database.inc | |
| index f78098b..01b6385 100644 | |
| --- a/includes/database/database.inc | |
| +++ b/includes/database/database.inc |
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
| // Lifted from https://stackoverflow.com/a/22103222 | |
| if (typeof console === "undefined" || typeof console.log === "undefined") { | |
| console.log = function(msg) { | |
| alert(msg); | |
| }; | |
| } |
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
| <?php | |
| $type = 'rules_config'; | |
| $query = new EntityFieldQuery(); | |
| $rules = $query->entityCondition('entity_type', $type) | |
| ->execute(); | |
| if (!$rules) { | |
| return; | |
| } |
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
| <?php | |
| /* | |
| If you have a large number of existing files then you will want | |
| to implement batch in hook_update_N(). I didn't need that so it | |
| isn't implemented here. If you need it read this article | |
| http://bleen.net/blog/running-batch-processes-update-hook-bed | |
| */ | |
| /** |
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
| if (!empty($_ENV['AH_SITE_ENVIRONMENT'])) { | |
| $conf['composer_manager_file_dir'] = "/var/www/html/{$_ENV['AH_SITE_GROUP']}.{$_ENV['AH_SITE_ENVIRONMENT']}/docroot/sites/default/files/composer"; | |
| $conf['composer_manager_vendor_dir'] = "{$conf['composer_manager_file_dir']}/vendor"; | |
| } |
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 -e | |
| # | |
| # Git pre-commit hook that blocks commits for files that contain swear words. | |
| # | |
| # Created by Dave Hall - http://davehall.com.au | |
| # Distributed under the terms of the WTFPL - http://www.wtfpl.net/ | |
| # | |
| # Please don't use this fucking script, it is shit! | |
| # |
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 | |
| # | |
| # Git pre-commit hook for Drupal projects. | |
| # Created by Dave Hall - http://davehall.com.au | |
| # Distributed under the terms of the WTFPL - http://www.wtfpl.net/ | |
| # | |
| set -e |
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
| UPDATE deploy_manager_entities dme | |
| JOIN ( | |
| SELECT br.bid, MAX(br.vid) max_vid | |
| FROM bean_revision br | |
| INNER JOIN deploy_manager_entities dme | |
| ON br.bid = dme.entity_id | |
| GROUP BY br.bid | |
| ) b | |
| ON b.bid = dme.entity_id | |
| SET dme.revision_id = b.max_vid |
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
| <?php | |
| /** | |
| * Example settings.php which supports per environment configs on different hosting platforms. | |
| */ | |
| $include = ''; | |
| // Pantheon | |
| if (isset($_SERVER['PANTHEON_ENVIRONMENT'])) { | |
| $include = __DIR__ . "/config/settings.{$_SERVER['PANTHEON_ENVIRONMENT']}.php"; | |
| } |
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
| <!DOCTYPE HTML> | |
| <html> | |
| <head> | |
| <title>SSH Link Test</title> | |
| <meta charset="UTF-8"> | |
| </head> | |
| <body> | |
| <p><a href="ssh://new@sdf.org">click me</a></p> | |
| </body> | |
| </html> |