Skip to content

Instantly share code, notes, and snippets.

View kostajh's full-sized avatar

Kosta Harlan kostajh

View GitHub Profile
Security Updates Best Practices
==================================
The general workflow for running security updates is:
1. Make sure your local development environment for the site is up-to-date (sync the database from production, if needed)
1. If the site hasn't been managed for a long time, use `drush rsync @example.prod @example.local` (using the `--exclude` flag to exclude large directories like `sites/default/files`). Then type `git status`. If there are any unmanaged files, add them to version control.
2. In your local environment, run `drush up --security-only`.
1. Look at the list of packages that will be updated. Go to each project page on Drupal.org and read the release notes.
2. You may need to read several versions worth of release notes. You want to see if there are mentions of breaking changes or any changes to features/functionality your site uses. This is usually the most time consuming and difficult part of running the updates.
version: '2'
services:
web:
build: .
ports:
- "80:80"
depends_on:
- db
- selenium
volumes:
</span><span style="color: #E5E5E5;"><span style="background-color: #00FFFF;"><b>Test file: /var/lib/jenkins/workspace/CLIENT/tests/casperjs/tests/online-help.js</b></span></span>
<span style="display: none;">Test file: /var/lib/jenkins/workspace/CLIENT/tests/casperjs/tests/online-help.js
</span><span style="color: #CDCD00;"># Restrict access to online help to Administrators only</span>
<span style="display: none;"># Restrict access to online help to Administrators only
</span><span style="color: #00CD00;"><b>PASS</b></span> Anonymous user denied access to restricted node.
<span style="display: none;">PASS Anonymous user denied access to restricted node.
</span><span style="color: #00CD00;"><b>PASS</b></span> Login form present on Access Denied page
<span style="display: none;">PASS Login form present on Access Denied page
</span><span style="color: #00CD00;"><b>PASS</b></span> School Administrator user denied access to restricted node.
<span style="display: none;"
{
"DRUSH_COMMAND_NOT_FOUND": [
"The drush command 'made-up-command' could not be found. Run `drush cache-clear drush` to clear the commandfile cache if you have installed new extensions."
],
"DRUSH_NO_DRUPAL_ROOT": [
"A Drupal installation directory could not be found"
]
}
@kostajh
kostajh / core-status.json
Created December 18, 2013 13:22
core-status --format=json
{
"php-bin": "/usr/bin/php",
"php-os": "Linux",
"php-conf": [
"/etc/php5/cli/php.ini",
"/home/kosta/.drush/drush.ini"
],
"drush-version": "7.0-dev",
"drush-conf": [
"/home/kosta/.drush/drushrc.php"
@kostajh
kostajh / setup.py
Last active December 31, 2015 12:59
Call with something like `python3 setup.py --username ACQUIA_CLOUD_USERNAME --password ACQUIA_CLOUD_PASSWORD --branch GIT_BRANCH`
#!/usr/bin/env python3
import subprocess
import json
import time
import sys
import argparse
baseurl = 'https://cloudapi.acquia.com/v1/sites/devcloud:MYSITE'
parser = argparse.ArgumentParser(description='Get username and password.')
// Test Access to the online help section.
// The online help handbook should only be accessible to administrators.
casper.test.begin('Restrict access to online help to Administrators only', function suite(test) {
// Check that online help is not accessible to anonymous user.
casper.start();
casper.setHttpAuth('USERNAME', 'PASSWORD');
casper.thenOpen(link + '/handbook').waitForSelector('.error',
@kostajh
kostajh / composer.json
Created December 16, 2013 15:04
Install Drush 7 with the drush-server patch.
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/kostajh/drush"
}
],
"require": {
"drush/drush": "dev-web-service-drush-server"
}
var uri = casper.cli.get('uri');
var link = 'http://' + uri;
var alias = casper.cli.get('alias');
var drush = 'http://localhost:8888/' + alias + ' ';
var repo_dir = casper.cli.get('repo');
casper.test.begin('Setup methods for test suite', function suite(test) {
// Begin setUp().
casper.start(drush + 'core-status --format=json', function() {
@kostajh
kostajh / 0_reuse_code.js
Created December 12, 2013 19:42
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console