1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 07:36:14 -05:00
Commit Graph

4649 Commits

Author SHA1 Message Date
e6902179f8 Fixes: #1101 - Fixed ModelValidators and validation methods (#1242)
* Extend StringLength attributes for emails to 256 char

* Modified validations to check email lengths > 256
2021-03-25 14:21:23 -04:00
584d3e771c Throw error if not enough seats available for a sync (#1241)
* BadRequest if a sync cannot be completed due to seat count

* Comment the reason for the suppressed exception
2021-03-25 08:42:04 -05:00
c09ae5f906 ReferenceEvent Rebilled missing data (#1240) 2021-03-24 15:27:16 -04:00
a2f33176aa Fix column NULLness for OrganizationUser table (#1239)
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`.
2021-03-24 12:50:57 -04:00
41ec23631a Fixed badge link to open workflows on master (#1238) 2021-03-24 10:13:37 -04:00
7e127cec13 Support encrypted RSA 4096 keys (#1236)
Testing showed 4096 keys with minimal comments resulted in 4680
characters. Round to 5000 for a buffer.
2021-03-23 16:40:28 -05:00
0cfd50382d [Reset Password] Update all existing tables/sprocs/migrator scripts (#1235) 2021-03-23 16:04:11 -05:00
fccf5cc00e Remove appveyor.yml and replaced badge in README.md (#1231)
* Remove appveyor.yml

* Replaced appveyor badge with GitHub workflow badge
2021-03-23 16:25:23 -04:00
7bb26a7203 K8s Proxy CI Build (#1233)
* adding the new k8s-proxy container to the server build

* updating the file path fore the new dockerfile
2021-03-23 11:19:01 -07:00
07f37d1f74 WebAuthn (#903) 2021-03-22 23:21:43 +01:00
905b4b06da Add identifiers to Triggers and Jobs (#1230) 2021-03-22 20:54:12 +01:00
7309a37bdc [Bug] Updated incorrect formatting/spelling on migrator script (#1228) 2021-03-22 10:24:28 -05:00
455e4b25cf Add protonmail/protonvpn global equivalent domains (#1224) 2021-03-22 11:08:34 -04:00
989d4df599 Direct upload to Azure/Local (#1188)
* 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>
2021-03-21 23:01:19 -05:00
fd42b227b3 Update dev setup guide (#1222)
* 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
2021-03-22 07:56:31 +10:00
694347e8d3 Fix no licence expiration date on self-hosted (#1217)
* Use our expiration date if no next billing date

* Remove unnecessary null checks

* Remove null check
2021-03-19 08:05:57 +10:00
aea85ea0eb Fixes #1101: Extend email column length to 256 characters (MSSQL) (#1191)
* Fixes bitwarden/server/#1101 - Extended length of Email column to 256 characters - Installation

* Fixes bitwarden/server/#1101 - Extended length of Email column to 256 characters - User

* Fixes bitwarden/server/#1101 - Extended length of BillingEmail column to 256 characters - Organization

* Fixes bitwarden/server/#1101 - Extended length of Email column to 256 characters - OrganizationUser

* Fixes bitwarden/server/#1101 - Extended length of Email column to 256 characters - EmergencyAccess

* Fixes bitwarden/server/bitwarden#1101 - Fixed issues after PR review
2021-03-18 16:43:49 -04:00
d0f7750650 Don't use dev licensing cert if self-hosted (#1216) 2021-03-18 07:21:00 +10:00
5876820994 The other outdated link (#1215)
I forgot there was also a PowerShell command.
2021-03-15 09:40:28 -04:00
2c0dd4bf88 Update bitwarden.sh (#1203) 2021-03-15 09:29:23 -04:00
115948d1d7 Update bitwarden.ps1 (#1202)
* Update bitwarden.ps1

* Update scripts/bitwarden.ps1

Co-authored-by: Chad Scharf <3904944+cscharf@users.noreply.github.com>
2021-03-15 09:29:03 -04:00
0f7e8dc806 Fixes #1101: Extend email column length to 256 characters (Postgres) (#1192) 2021-03-12 14:28:30 -05:00
39f9f15bd4 Correct localhost port number in README (#1204)
Co-authored-by: Kendra Todd <ktodd@bitwarden.com>
2021-03-11 13:32:41 -07:00
52d29aef94 Add quickfix for problem with src/Identity (#1201) 2021-03-11 11:00:17 -05:00
df7a035d9b Minor release version bump 1.40.0 (#1199) 2021-03-10 11:19:40 -05:00
37c7dd713d Outdated link (#1200)
The anchor https://bitwarden.com/help/article/install-on-premise/#script-commands no longer exist, it should be https://bitwarden.com/help/article/install-on-premise/#script-commands-reference
2021-03-10 08:36:06 -05:00
a83cbf965e MultiplartSectionBody streams have 0 length until read. (#1196) 2021-03-09 10:49:49 -06:00
7d5b835a79 Use Any from Linq, not internal Entity Framework Any (#1194) 2021-03-08 15:13:43 -06:00
edb13bbba8 Push syncs on Send Access (#1190)
* 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
2021-03-05 18:36:20 -06:00
c19121948d adding docker to the rc branch workflow (#1183) 2021-03-04 13:21:27 -08:00
41341d6807 adding in the docker push for the rc images (#1182) 2021-03-04 09:50:32 -08:00
8ad9a42854 adding release branch build and docker tag/push (#1181) 2021-03-04 09:15:30 -08:00
a18e1b7dca Exempt owners and admins from single org and 2FA policy (#1171)
* 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
2021-03-03 08:15:42 +10:00
c2d34d7271 Fix send file length always zero (#1175)
* 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
2021-03-02 09:27:11 -06:00
8d5fc21b51 Prepare for send direct upload (#1174)
* 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
2021-03-01 15:01:04 -06:00
13f12aaf58 Update EmergencyAccessConfirmed.text.hbs (#1172) 2021-03-01 10:49:13 -05:00
3850f0e400 Fix empty grantee or grantor names in emergency access emails (#1162)
* Fix empty grantee or grantor names in emails

* Add migrator dbscript for changes to ReadToNotify
2021-02-26 08:11:58 +10:00
b21c9042ca added expiration date and creator identifier to the Send access response model (#1166) 2021-02-25 17:04:53 -05:00
2f7c2a64e0 Reference events for Send (#1165) 2021-02-25 13:40:26 -05:00
07427623b3 [Email] Updated welcome email button (#1164) 2021-02-25 11:24:05 -06:00
73346b01d1 Add factory to IGlobalSettings DI singleton (#1163)
It turns out Singleton DI of interfaces does not use the specified
instance's Singleton, but just creates its own. This fixes the bug
where classes expecting an IGlobalSettings were given an empty GlobaSettings
instance
2021-02-25 07:00:28 -06:00
e350daeeee Use sas token for send downloads (#1157)
* Remove Url from SendFileModel

Url is now generated on the fly with limited lifetime.

New model houses the download url generated

* Create API endpoint for getting Send file download url

* Generate limited-life Azure download urls

* Lint fix
2021-02-24 13:03:16 -06:00
f8940e4be5 Checked Emergency Access access type on access initiation (#1160)
* also updated the View method

* removed old code

* naming refactor

* used the right type

* also checked PasswordAsync()

* also checked GetPolicies()
2021-02-23 17:12:52 -05:00
499c30a805 Fix error message if already accepted EA invite (#1159)
* Fix error message if already accepted EA invite

* Fix error message wording depending on EA status
2021-02-24 05:46:52 +10:00
cc964ccb9c Add https://2fa.directory to CSP (#1156)
* Add https://2fa.directory to CSP

* remove old domain for towfactorauth.org
2021-02-22 19:15:58 -05:00
5537470703 Use sas token for attachment downloads (#1153)
* Get limited life attachment download URL

This change limits url download to a 1min lifetime.
This requires moving to a new container to allow for non-public blob
access.

Clients will have to call GetAttachmentData api function to receive the download
URL. For backwards compatibility, attachment URLs are still present, but will not
work for attachments stored in non-public access blobs.

* Make GlobalSettings interface for testing

* Test LocalAttachmentStorageService equivalence

* Remove comment

* Add missing globalSettings using

* Simplify default attachment container

* Default to attachments containe for existing methods

A new upload method will be made for uploading to attachments-v2.
For compatibility for clients which don't use these new methods, we need
to still use the old container. The new container will be used only for
new uploads

* Remove Default MetaData fixture.

* Keep attachments container blob-level security for all instances

* Close unclosed FileStream

* Favor default value for noop services
2021-02-22 15:35:16 -06:00
78606d5f13 endpoint to display config settings (#1150) 2021-02-18 15:15:08 -05:00
1ca6e917af return fa-globe icon when not found (#1149) 2021-02-18 12:18:50 -05:00
cd2834cc15 Revert "remove premium checks for internal testing"
This reverts commit 26fb6fc3b7.
2021-02-17 13:16:01 -05:00
ad6abaccc8 Fix error message if user already accepted invite (#1140)
* Fix error message if already accepted invitation

* Improve error message wording

* Use consistent capitalization of organization
2021-02-17 09:28:49 +10:00