Skip to content

Commit

Permalink
Merge pull request #98 from bausshf/master
Browse files Browse the repository at this point in the history
GDPR Security Patch - Fix code errors
  • Loading branch information
bausshf authored Jun 9, 2018
2 parents 68f3036 + 1d97d3c commit db930a2
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 db930a2

Please sign in to comment.