Skip to content

Instantly share code, notes, and snippets.

@jsl
Created February 11, 2013 19:07
Show Gist options
  • Save jsl/4756737 to your computer and use it in GitHub Desktop.
Save jsl/4756737 to your computer and use it in GitHub Desktop.
Script to patch recent Rails versions for CVE-2013-0269 and CVE-2013-0276.
#!/bin/bash
# First change your Rails dependency in the Gemfile to 3.2.12.
# Make sure afterwards that the commit includes the update to the Rails version
# and that it contains the JSON gem version 1.7.7.
git co -b patch_CVE-2013-0269_CVE-2013-0276
bundle update rails
bundle update json
git add -A
git commit -m"[NO STORY] Patches for CVE-2013-0269 and CVE-2013-0276."
read -p "Press [Enter] key to push branch..."
git push origin patch_CVE-2013-0269_CVE-2013-0276:patch_CVE-2013-0269_CVE-2013-0276
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment