-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[PM-41693] Align error behavior when Send is not accessible #8229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,7 +11,6 @@ namespace Bit.Core.Tools.SendFeatures.Queries; | |
| public class SendAuthenticationQuery : ISendAuthenticationQuery | ||
| { | ||
| private static readonly NotAuthenticated NOT_AUTHENTICATED = new NotAuthenticated(); | ||
| private static readonly NeverAuthenticate NEVER_AUTHENTICATE = new NeverAuthenticate(); | ||
| private static readonly SendInaccessible SEND_INACCESSIBLE = new SendInaccessible(); | ||
|
|
||
| private readonly ISendRepository _sendRepository; | ||
|
|
@@ -37,7 +36,7 @@ public async Task<SendAuthenticationMethod> GetAuthenticationMethod(Guid sendId) | |
|
|
||
| SendAuthenticationMethod method = send switch | ||
| { | ||
| null => NEVER_AUTHENTICATE, | ||
| null => SEND_INACCESSIBLE, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. β QUESTION: Was the removal of the Send enumeration protection reviewed with the security team? ContextThis change (plus the deletion of The PR description acknowledges the trade-off, and the residual risk looks low given Send IDs are 122 bits of randomness (offline enumeration is infeasible; the practical leak is limited to someone who already holds a link learning whether the Send is still live). Asking mainly so the sign-off is recorded on the PR β was AppSec looped in, given this reverses an explicitly documented anti-enumeration measure?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| var s when s.Disabled => SEND_INACCESSIBLE, | ||
| var s when s.AccessCount >= s.MaxAccessCount.GetValueOrDefault(int.MaxValue) => SEND_INACCESSIBLE, | ||
| var s when s.ExpirationDate.GetValueOrDefault(DateTime.MaxValue) < DateTime.UtcNow => SEND_INACCESSIBLE, | ||
|
|
||
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We want to make sure we're keeping our settings files lean so we will want to remove this setting.