mirror of
https://github.com/jlengrand/openapi-generator.git
synced 2026-05-16 08:31:26 +00:00
Merge pull request #3249 from wing328/csharp_security_fix
[C#] better code injection handling for C# API client
This commit is contained in:
@@ -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("*/", "");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user