Merge pull request #3230 from wing328/security_fix_python

[Python] better code injection handling for Python
This commit is contained in:
wing328
2016-06-28 20:09:40 +08:00
committed by GitHub
74 changed files with 3617 additions and 54 deletions

View File

@@ -590,5 +590,16 @@ public class PythonClientCodegen extends DefaultCodegen implements CodegenConfig
p.example = example;
}
@Override
public String escapeQuotationMark(String input) {
// remove ' to avoid code injection
return input.replace("'", "");
}
@Override
public String escapeUnsafeCharacters(String input) {
// remove multiline comment
return input.replace("'''", "");
}
}