Skip to content

Commit

Permalink
GDPR Security Patch - Fix code errors
Browse files Browse the repository at this point in the history
  • Loading branch information
bausshf committed Jun 9, 2018
1 parent 14bed1c commit 1d97d3c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/logging.d
Expand Up @@ -222,7 +222,7 @@ Message:
bool protectedHeaders = protectedPrivacy || !client.privacy["__D_LOGGING_PROTECT_HEADERS"].adminVisible;

import std.algorithm : canFind;
import std.string : format;
import std.string : format, indexOf, lastIndexOf;
import vibe.stream.operations : readAllUTF8;
import diamond.core.webconfig;
import diamond.core.senc;
Expand Down
2 changes: 1 addition & 1 deletion http/cookies.d
Expand Up @@ -59,7 +59,7 @@ static if (isWeb)
];
}

return _cookieInformation
return _cookieInformation;
}

/// Enumeration of http cookie consent types.
Expand Down
1 change: 1 addition & 0 deletions mail/smtp.d
Expand Up @@ -15,6 +15,7 @@ static if (isWeb)

import diamond.errors.checks;
import diamond.core.traits;
import diamond.security.validation.sensitive;

// Alias to SMTPAuthType.
mixin(createEnumAlias!SMTPAuthType("SmtpAuthType"));
Expand Down
2 changes: 2 additions & 0 deletions security/validation/sensitive.d
Expand Up @@ -368,6 +368,8 @@ void validateSensitiveData(string data, SecurityLevel level)
{
if (hasSensitiveData(data, level))
{
import diamond.errors.exceptions : SensitiveDataException;

throw new SensitiveDataException("The input contains sensitive data. Try to change security policies or exclude the sensitive data from the input.");
}
}

0 comments on commit 1d97d3c

Please sign in to comment.