* Add send HideEmail to tables and models
* Respect HideEmail setting for Sends
* Recreate SendView to include new HideEmail column
* Enforce new Send policy
* Insert default value for new HideEmail column
* Delete c95d7598-71cc-4eab-8b08-aced0045198b.json
* Remove unrelated files
* Revert disableSendPolicy, add sendOptionsPolicy
* Minor style fixes
* Update SQL project with Send.HideEmail column
* unit test SendOptionsPolicy.DisableHideEmail
* Add SendOptionsPolicy to Portal
* Make HideEmail nullable, fix migrator script
* Remove NOT NULL constraint from HideEmail
* Fix style
* Make HideEmail nullable
* minor fixes to model and error message
* Move SendOptionsExemption banner
Co-authored-by: Chad Scharf <3904944+cscharf@users.noreply.github.com>
Fix column `NULL`ness for OrganizationUser table in Upgrade script; prior PR I missed in the upgrade script submitted that the ALTER COLUMN statement incorrectly set the column to `NOT NULL` when the table definition had it correctly as `NULL`.
* Direct upload to azure
To validate file sizes in the event of a rogue client, Azure event webhooks
will be hooked up to AzureValidateFile.
Sends outside of a grace size will be deleted as non-compliant.
TODO: LocalSendFileStorageService direct upload method/endpoint.
* Quick respond to no-body event calls
These shouldn't happen, but might if some errant get requests occur
* Event Grid only POSTS to webhook
* Enable local storage direct file upload
* Increase file size difference leeway
* Upload through service
* Fix LocalFileSendStorage
It turns out that multipartHttpStreams do not have a length
until read. this causes all long files to be "invalid". We need to
write the entire stream, then validate length, just like Azure.
the difference is, We can return an exception to local storage
admonishing the client for lying
* Update src/Api/Utilities/ApiHelpers.cs
Co-authored-by: Chad Scharf <3904944+cscharf@users.noreply.github.com>
* Do not delete directory if it has files
* Allow large uploads for self hosted instances
* Fix formatting
* Re-verfiy access and increment access count on download of Send File
* Update src/Core/Services/Implementations/SendService.cs
Co-authored-by: Chad Scharf <3904944+cscharf@users.noreply.github.com>
* Add back in original Send upload
* Update size and mark as validated upon Send file validation
* Log azure file validation errors
* Lint fix
Co-authored-by: Chad Scharf <3904944+cscharf@users.noreply.github.com>
* Update dev setup guide with current best practice
* Minor amendments to setup instructions
* Move vault_dev migrator script to its own file
* Fix typo, use command line args for SA_PASSWORD
* Move setup guide to its own file
* fix typo
* Push syncs on Send Access
* Revert "Push syncs on Send Access"
This reverts commit 6a3eb7af4f.
* Push update of Send directly since we can't use SaveSendAsync method
* Fix single org policy when creating organization
Exclude owners and admins from policy when creating new org
* Fix single org and 2FA policy on accepting invite
Exclude owners and admins from policies
* Remove looped async calls
* Fix code style and formatting
* HttpStream must be read prior to knowing it length
We also need to create the send prior to saving the stream so we
have well defined save location. Solve chicken-and-egg problem by saving
the Send twice. This also allows for validation that the stream received
is the same length as that promissed by the content-length header
* Get encrypted file length from request
* Add sendId to path
Event Grid returns the blob path, which will be used to grab a Send and verify file size
* Re-validate access upon file download
Increment access count only when file is downloaded. File
name and size are leaked, but this is a good first step toward
solving the access-download race