Prevented a future accidental XSS vulnerability in Graph type selection

The type parameter was passed to an exception that is currently turned into
json, but in the future the way this exception is handled could have changed.
This commit is contained in:
Risto Lahtela 2021-01-24 11:05:04 +02:00
parent 8544e5a904
commit a6c286b0f2

View File

@ -109,7 +109,7 @@ public class GraphsJSONResolver implements Resolver {
case "serverPie":
return DataID.GRAPH_SERVER_PIE;
default:
throw new BadRequestException("unknown 'type' parameter: " + type);
throw new BadRequestException("unknown 'type' parameter.");
}
}