Skip to content

Instantly share code, notes, and snippets.

@kevindoran
Created June 1, 2013 03:03
Show Gist options
  • Save kevindoran/5689151 to your computer and use it in GitHub Desktop.
Save kevindoran/5689151 to your computer and use it in GitHub Desktop.
Dragon class used to demonstrate security issues when using Java serialization.
public Dragon(double wingSpan, double name, SpeedCalculator speedCalculator) {
// There are no input checks this time!
this.wingSpan = wingSpan;
this.name = name;
this.speedCalculator = speedCalculator; // This is new!
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment