Merge pull request #3231 from wing328/security_fix_ruby

[Ruby] better code injection handling for Ruby API client
This commit is contained in:
wing328
2016-06-28 20:09:55 +08:00
committed by GitHub
61 changed files with 2356 additions and 71 deletions

View File

@@ -712,4 +712,15 @@ public class RubyClientCodegen extends DefaultCodegen implements CodegenConfig {
//
//return super.shouldOverwrite(filename) && !filename.endsWith("_spec.rb");
}
@Override
public String escapeQuotationMark(String input) {
// remove ' to avoid code injection
return input.replace("'", "");
}
@Override
public String escapeUnsafeCharacters(String input) {
return input.replace("=end", "");
}
}