better code injection handling for c#

This commit is contained in:
wing328
2016-06-29 22:52:12 +08:00
parent acc28495e8
commit d79274d548
34 changed files with 2765 additions and 10 deletions

View File

@@ -656,4 +656,16 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
public String testPackageName() {
return this.packageName + ".Test";
}
@Override
public String escapeQuotationMark(String input) {
// remove " to avoid code injection
return input.replace("\"", "");
}
@Override
public String escapeUnsafeCharacters(String input) {
return input.replace("*/", "");
}
}