mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-01-11 19:44:55 +00:00
fix: Potential JSON under-read fix
This commit is contained in:
@@ -155,9 +155,14 @@ namespace ICD.Common.Utils.Extensions
|
||||
while (reader.TokenType != JsonToken.EndObject)
|
||||
{
|
||||
if (reader.TokenType != JsonToken.PropertyName)
|
||||
throw new FormatException();
|
||||
throw new FormatException(string.Format("Expected token {0} got {1}", JsonToken.PropertyName, reader.TokenType));
|
||||
|
||||
switch ((string)reader.Value)
|
||||
string propertyName = (string)reader.Value;
|
||||
|
||||
// Step into the value
|
||||
reader.Read();
|
||||
|
||||
switch (propertyName)
|
||||
{
|
||||
case PROPERTY_KEY:
|
||||
key = readKey(extends, reader);
|
||||
|
||||
Reference in New Issue
Block a user