Commit Graph

429 Commits

Author SHA1 Message Date
Bond_009
a9a5fcde81 Use ArgumentNullException.ThrowIfNull helper method
Did a simple search/replace on the whole repo (except the RSSDP project)
This reduces LOC and should improve performance (methods containing a throw statement don't get inlined)

```
if \((\w+) == null\)
\s+\{
\s+throw new ArgumentNullException\((.*)\);
\s+\}
```

```
ArgumentNullException.ThrowIfNull($1);
```
2022-10-06 20:21:23 +02:00
Cody Robibero
3716077495 Backport pull request #8433 from jellyfin/release-10.8.z
Update to dotnet 6.0.9

Original-merge: 4ec82ec662

Merged-by: Joshua M. Boniface <joshua@boniface.me>

Backported-by: Joshua M. Boniface <joshua@boniface.me>
2022-09-23 23:12:50 -04:00
Claus Vium
38b7d0222f
Merge pull request #8377 from Bond-009/resetcase
Make Password Reset case sensitive
2022-09-09 14:01:44 +02:00
Bond_009
5f8477ba47 Make Password Reset case sensitive 2022-09-09 13:36:27 +02:00
Claus Vium
1cbf5431aa
Merge pull request #8250 from Bond-009/minor18
Minor cleanup
2022-09-09 13:27:52 +02:00
Niels van Velzen
dd4af49962 Use Guid type for UserConfiguration fields 2022-08-27 14:19:47 +02:00
Bond_009
5036afd691 Minor cleanup 2022-08-18 13:56:23 +02:00
Cody Robibero
010228b3c0 Backport pull request #8234 from jellyfin/release-10.8.z
update to dotnet 6.0.8

Original-merge: 31f9938e3a

Merged-by: Joshua M. Boniface <joshua@boniface.me>

Backported-by: Joshua Boniface <joshua@boniface.me>
2022-08-13 21:46:35 -04:00
Joshua Boniface
be3d57ad41 Backport pull request #8115 from jellyfin/release-10.8.z
Update to dotnet 6.0.7

Authored-by: Cody Robibero <cody@robibe.ro>

Merged-by: Joshua M. Boniface <joshua@boniface.me>

Original-merge: d0fd23bb4b
2022-07-20 19:29:09 -04:00
Joshua M. Boniface
3061446c87 Merge pull request #7984 from crobibero/dotnet-6.0.6
Upgrade to dotnet 6.0.6, update remaining dependencies

(cherry picked from commit 56e7b323de)
Signed-off-by: Joshua Boniface <joshua@boniface.me>
2022-06-29 01:26:36 -04:00
Cody Robibero
b611afe34c Merge pull request #7774 from crobibero/api-authinfo
(cherry picked from commit 825e6460c9)
Signed-off-by: Joshua Boniface <joshua@boniface.me>
2022-05-20 23:00:22 -04:00
Joshua M. Boniface
bc1a78575a Merge pull request #7766 from crobibero/dotnet-6.0.5
(cherry picked from commit 71bf567045)
Signed-off-by: Joshua Boniface <joshua@boniface.me>
2022-05-20 23:00:15 -04:00
dependabot[bot]
812841d01e
Bump StyleCop.Analyzers from 1.2.0-beta.406 to 1.2.0-beta.435 (#7726)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-09 15:24:09 +02:00
Joshua M. Boniface
96d2d2428a Merge pull request #7590 from crobibero/dotnet-6.0.4
(cherry picked from commit 5778541d2f)
Signed-off-by: Joshua Boniface <joshua@boniface.me>
2022-04-17 15:45:47 -04:00
dependabot[bot]
dde984bd0e
Bump StyleCop.Analyzers from 1.2.0-beta.376 to 1.2.0-beta.406
Bumps [StyleCop.Analyzers](https://github.com/DotNetAnalyzers/StyleCopAnalyzers) from 1.2.0-beta.376 to 1.2.0-beta.406.
- [Release notes](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/releases)
- [Commits](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/compare/1.2.0-beta.376...1.2.0-beta.406)

---
updated-dependencies:
- dependency-name: StyleCop.Analyzers
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-21 12:22:11 +00:00
Claus Vium
53209830e7
Merge pull request #7346 from Bond-009/guid
Optimize Guid comparisons
2022-03-11 08:15:12 +01:00
Cody Robibero
965bf7332f Update to dotnet 6.0.3 2022-03-08 17:16:33 -07:00
Bond_009
f50a250cd9 Optimize Guid comparisons
* Use Guid.Equals(Guid) instead of the == override
* Ban the usage of Guid.Equals(Object) to prevent accidental boxing
* Compare to default(Guid) instead of Guid.Empty
2022-02-21 14:15:09 +01:00
Cody Robibero
b98cc71c3b Update to dotnet 6.0.2
Signed-off-by: Cody Robibero <cody@robibe.ro>
2022-02-08 17:36:20 -07:00
dependabot[bot]
0c89459d5b
Bump System.Linq.Async from 5.1.0 to 6.0.1
Bumps [System.Linq.Async](https://github.com/dotnet/reactive) from 5.1.0 to 6.0.1.
- [Release notes](https://github.com/dotnet/reactive/releases)
- [Commits](https://github.com/dotnet/reactive/compare/ixnet-v5.1.0...ixnet-v6.0.1)

---
updated-dependencies:
- dependency-name: System.Linq.Async
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-07 12:01:03 +00:00
Bond_009
2dcb2f8a9f Ban the usage of Task.Result
If the calling function can't be made async easily you can still use
.GetAwaiter().GetResult(), which is way easier to find in the future
2022-01-22 16:48:31 +01:00
Cody Robibero
a60cb280a3 Properly populate QueryResult 2022-01-20 08:53:06 -07:00
Bond-009
b2a2bdb088
Merge pull request #7049 from crobibero/warn40219 2021-12-30 13:50:39 +01:00
Cody Robibero
57db188c2e Fix device ordering 2021-12-27 16:43:29 -07:00
Cody Robibero
7bfc6b5679 Remove more warnings 2021-12-27 07:38:06 -07:00
Bond_009
cbfa355e31 Update StyleCop 2021-12-24 18:28:27 +01:00
cvium
b880dc8a4a Use our own Contains extension 2021-12-20 13:31:07 +01:00
Cody Robibero
5e8aaa68cf Update to dotnet 6.0.1 2021-12-14 23:47:07 -07:00
dependabot[bot]
0120d80b78
Bump System.Linq.Async from 5.0.0 to 5.1.0
Bumps [System.Linq.Async](https://github.com/dotnet/reactive) from 5.0.0 to 5.1.0.
- [Release notes](https://github.com/dotnet/reactive/releases)
- [Commits](https://github.com/dotnet/reactive/compare/ixnet-v5.0.0...ixnet-v5.1.0)

---
updated-dependencies:
- dependency-name: System.Linq.Async
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-13 12:00:51 +00:00
Cody Robibero
34df1a030b
Merge pull request #6818 from Bond-009/password 2021-11-13 16:56:25 -07:00
Nicholas Sica
8ae5316198
Fix Ombi auth through Jellyfin 2021-11-12 16:23:58 -05:00
Nicholas Sica
c5e42ddcc6
Fix Ombi auth through Jellyfin
Co-authored-by: Cody Robibero <cody@robibe.ro>
2021-11-11 11:03:27 -05:00
NickSica
4b2c40f717 Fixes Ombi auth through Jellyfin 2021-11-11 00:43:43 -05:00
Bond_009
5265b3eee7 Replace PBKDF2-SHA1 with PBKDF2-SHA512
This also migrates already created passwords on login

Source for the number of iterations:
https://cheatsheetseries.owasp.org/cheatsheets/Password_Storage_Cheat_Sheet.html#pbkdf2
2021-11-10 22:34:54 +01:00
Bond_009
5726535a26 Fix some warnings
609 left
2021-11-09 13:14:31 +01:00
Cody Robibero
40045d2147 Update to full dotnet 6 2021-11-08 09:40:12 -07:00
Bond_009
1b6eb2ff2d Enable nullable for more files 2021-10-26 13:56:30 +02:00
Cody Robibero
2b10251b32 Update to dotnet6.rc2 2021-10-12 18:31:58 -06:00
Claus Vium
1bfe6342df
Merge pull request #6676 from Bond-009/rng
Use static crypto rng
2021-10-09 08:11:22 +02:00
Claus Vium
b16e6621b3
Merge pull request #6663 from crobibero/dotnet-6-rc1
Reference dotnet6-rc1 packages
2021-10-08 16:06:15 +02:00
Bond_009
3b492d4af8 Use static crypto rng 2021-10-08 15:02:58 +02:00
cvium
3add805cbf Return the path to the pinfile in forgot password 2021-10-07 23:20:54 +02:00
Cody Robibero
017380f1dd Reference dotnet6-rc1 packages 2021-10-04 07:43:40 -06:00
KonH
7c282ec369 Fix warning: The nullable warning suppression expression is redundant (#2149) 2021-10-03 10:43:41 +07:00
Bond_009
13fbfe6091 Target net6.0 2021-09-24 20:15:46 +02:00
Cody Robibero
e7d6c45509 Upgrade to dotnet 5.0.10 2021-09-19 15:06:27 -06:00
Fernando Fernández
e5980f8686
Fix typo in comment and remove useless ones 2021-09-07 19:25:04 +02:00
Fernando Fernández
f4af78817d
Move model configuration to its own classes 2021-09-06 21:15:31 +02:00
Fernando Fernández
c2652d21e1
Log EFCore migrations 2021-09-06 21:15:31 +02:00
Claus Vium
74fef6c05b
Merge pull request #6177 from Bond-009/async
Use async FileStreams where it makes sense
2021-09-06 13:55:34 +02:00
cvium
1172ece856 remove leading and trailing whitespace from the key 2021-09-03 23:56:19 +02:00
cvium
60185f99c4 fix the build 2021-09-03 21:43:06 +02:00
cvium
6b3ecf2533 Merge branch 'master' into bug/authorization-header-issue 2021-09-03 21:33:41 +02:00
Cody Robibero
ff9d14c811 Merge remote-tracking branch 'upstream/master' into authenticationdb-efcore 2021-09-03 11:01:55 -06:00
Bond_009
e3dac4fda2 Use async FileStreams where it makes sense 2021-09-02 14:02:04 +02:00
Patrick Barron
cb52ccc699
Update Jellyfin.Server.Implementations/Devices/DeviceManager.cs
Co-authored-by: Claus Vium <cvium@users.noreply.github.com>
2021-08-31 10:57:48 -04:00
Cody Robibero
709f8e9faa Update to dotnet 5.0.9 2021-08-15 08:30:15 -06:00
Patrick Barron
8a1e55251e Fix devices migration 2021-08-13 21:28:17 -04:00
Patrick Barron
45f478f63e Merge branch 'master' into authenticationdb-efcore
# Conflicts:
#	Jellyfin.Server.Implementations/Security/AuthorizationContext.cs
#	MediaBrowser.Controller/Library/IUserManager.cs
#	MediaBrowser.Controller/Security/IAuthenticationRepository.cs
#	MediaBrowser.Controller/Session/ISessionManager.cs
2021-08-13 21:08:24 -04:00
Patrick Barron
15baf04bd2 Add IAuditableEntity 2021-08-13 20:35:31 -04:00
Bond-009
00c90cfb21
Merge pull request #6354 from Bond-009/nullable4
Enable nullable in more files
2021-07-30 09:49:40 +02:00
Rich Lander
c07e83fdf8
Invert code and style analysis configuration (#6334)
Co-authored-by: Bond-009 <bond.009@outlook.com>
2021-07-30 09:49:28 +02:00
Bond_009
501de7b6dc Enable nullable in more files 2021-07-26 23:02:32 +02:00
Cody Robibero
de12ee5dba Update to dotnet 5.0.8 2021-07-19 08:08:02 -06:00
Patrick Barron
60ce0c9fa9 Add dto for device options 2021-07-13 19:30:11 -04:00
Patrick Barron
06d682c296 Merge remote-tracking branch 'origin/authenticationdb-efcore' into authenticationdb-efcore 2021-06-27 16:46:09 -04:00
Patrick Barron
fdba71e133 Fix Api Key authentication 2021-06-27 16:44:34 -04:00
Patrick Barron
bbac9ff67e GetDeviceOptions always returns an instance of DeviceOptions 2021-06-27 16:42:26 -04:00
Patrick Barron
5d1139ec62
Update Jellyfin.Server.Implementations/Devices/DeviceManager.cs
Co-authored-by: Cody Robibero <cody@robibe.ro>
2021-06-26 15:17:57 -04:00
Patrick Barron
ae878fa051 Merge branch 'master' into authenticationdb-efcore
# Conflicts:
#	Emby.Server.Implementations/QuickConnect/QuickConnectManager.cs
#	Emby.Server.Implementations/Session/SessionManager.cs
#	Jellyfin.Server.Implementations/Security/AuthorizationContext.cs
2021-06-23 20:22:12 -04:00
Patrick Barron
3884837513 Convert method group to lambda in DeviceManager 2021-06-21 19:01:34 -04:00
Patrick Barron
67308f489f Implement DeleteDevice 2021-06-19 15:24:53 -04:00
Patrick Barron
2a9474f6e7 Count records before skipping 2021-06-19 15:24:42 -04:00
Patrick Barron
6b24cc6d1f Fix UpdateDeviceOptions 2021-06-19 15:24:26 -04:00
Patrick Barron
54fdc2fd88 Use ExecuteSqlInterpolated instead of ExecuteSqlRaw
oop
2021-06-18 19:15:08 -04:00
Patrick Barron
be88efce3c Merge branch 'master' into authenticationdb-efcore
# Conflicts:
#	Emby.Server.Implementations/Devices/DeviceManager.cs
#	Emby.Server.Implementations/HttpServer/Security/SessionContext.cs
#	Emby.Server.Implementations/Security/AuthenticationRepository.cs
#	Emby.Server.Implementations/Session/SessionManager.cs
#	Jellyfin.Server.Implementations/Security/AuthorizationContext.cs
#	MediaBrowser.Controller/Library/IUserManager.cs
#	MediaBrowser.Controller/Net/ISessionContext.cs
2021-06-18 18:56:10 -04:00
Patrick Barron
336ba2879f Re-add support for API keys 2021-06-18 18:26:58 -04:00
Patrick Barron
0292936c65 Use consistent name for db context 2021-06-18 17:09:59 -04:00
Patrick Barron
4206c0e091 Combine if statements 2021-06-18 17:09:39 -04:00
Patrick Barron
3fd0b1a359 Recreate devices migration with missing fields 2021-06-18 17:07:22 -04:00
Patrick Barron
3d9c16ba6b Fix concurrency issues 2021-06-18 17:06:38 -04:00
crobibero
e021a0e9ce Update to dotnet 5.0.7 2021-06-14 06:44:55 -06:00
Bond_009
0bc0601442 Fix some warnings 2021-05-28 14:33:54 +02:00
Patrick Barron
37a8a82ac5 Make methods static in AuthenticationContext 2021-05-21 00:19:54 -04:00
Patrick Barron
b6446c06ee Merge branch 'master' into authenticationdb-efcore
# Conflicts:
#	Emby.Server.Implementations/Security/AuthenticationRepository.cs
#	Jellyfin.Server.Implementations/Security/AuthorizationContext.cs
#	MediaBrowser.Controller/Devices/IDeviceManager.cs
2021-05-21 00:19:07 -04:00
Patrick Barron
a0c6f72762 Migrate authentication db to EF Core 2021-05-20 23:56:59 -04:00
Patrick Barron
ab63a7745c Add PaginatedQuery abstract class, change startIndex to skip 2021-05-20 20:48:41 -04:00
Patrick Barron
e1f7086077 Remove unnecessary query class 2021-05-20 20:39:22 -04:00
Patrick Barron
a225f34796 Merge branch 'master' into authenticationdb-efcore
# Conflicts:
#	Jellyfin.Api/Helpers/RequestHelpers.cs
2021-05-18 18:09:46 -04:00
crobibero
66b185898f Update to dotnet5.0.6 2021-05-14 17:28:36 -06:00
Bill Thornton
77f0f89e45
Merge pull request #5623 from barronpm/ef-cleanup2
EF Core Cleanup 2
2021-05-04 23:59:15 -04:00
Joshua M. Boniface
e2cfc308ea
Merge pull request #5729 from crobibero/dotnet5.0.5
Update to dotnet 5.0.5
2021-04-14 09:49:43 -04:00
Patrick Barron
ed0b5ff017 Fix builds 2021-04-10 17:11:59 -04:00
Patrick Barron
3ebc047434 Convert UpdateUser to solely async 2021-04-10 16:59:41 -04:00
Patrick Barron
8607b52541 Make device/session code async 2021-04-10 16:57:25 -04:00
Patrick Barron
44e71774b1 Rewrite device manager using EF Core 2021-04-10 16:17:36 -04:00
Patrick Barron
98e19c9fd3 Add device indexes 2021-04-10 16:16:08 -04:00
Patrick Barron
e6f1ffdc8d Add device entities to schema. 2021-04-10 16:15:59 -04:00
crobibero
b1faf8c2e8 Update to dotnet 5.0.5 2021-04-08 07:36:13 -06:00
cvium
d772fddfb3 make custompref value nullable 2021-04-07 13:09:00 +02:00
Bond-009
a92736baad
Merge pull request #5174 from barronpm/authenticateuser-cleanup 2021-04-03 00:26:56 +02:00
Patrick Barron
499785bebb Use new entities for API key endpoints 2021-04-01 17:08:22 -04:00
Patrick Barron
1c501b17d7 Add ApiKey entity and associated relationships 2021-04-01 17:05:54 -04:00
Patrick Barron
7364155579 Clean up user deletion 2021-03-25 19:51:27 -04:00
Patrick Barron
a7b29e2fe0 Clean up user renaming 2021-03-25 19:51:27 -04:00
Patrick Barron
daa21c9e99 Add migration 2021-03-25 19:51:27 -04:00
Patrick Barron
ea0a9c2cca Properly configure foreign keys 2021-03-25 19:51:27 -04:00
Patrick Barron
a07ad71222 Use NOCASE collation and index on username field 2021-03-25 19:51:27 -04:00
Patrick Barron
3c4187e780 Add indexes for user permissions and preferences 2021-03-25 19:51:27 -04:00
Patrick Barron
0a579e5bbd Configure user deletion behavior 2021-03-25 19:51:27 -04:00
Patrick Barron
3ffef5794e Delete unnecessary indexes
Multicolumn indexes can be queried on the first column without needing a separate index
2021-03-25 19:51:26 -04:00
Patrick Barron
12b8e29aef Fix duplicate permissions 2021-03-17 17:42:45 -04:00
Patrick Barron
e5380c653b Merge branch 'master' into ef-cleanup
# Conflicts:
#	Jellyfin.Data/Entities/Libraries/MediaFileStream.cs
#	Jellyfin.Data/Jellyfin.Data.csproj
2021-03-14 10:19:35 -04:00
Bond_009
a8ed753f6c FxCop -> Net Analyzers (part 2) 2021-03-13 22:33:28 +01:00
Bond_009
9ed7f429c0 FxCop -> Net Analyzers (part 1) 2021-03-09 03:04:47 +01:00
Patrick Barron
7c413a323b Move EF Core dependency out of Jellyfin.Data 2021-03-06 20:33:11 -05:00
Patrick Barron
f638ee6b09 Enable nullable for Jellyfin.Data and remove unnecessary attributes 2021-03-06 17:43:01 -05:00
Patrick Barron
03cc6b1d78 Make styling more consistent 2021-02-25 19:02:27 -05:00
cvium
442e770688 Validate the new username when renaming 2021-02-17 11:30:14 +01:00
Patrick Barron
f127096660 Don't allow new users to be created with the same name as an existing user. 2021-02-16 20:48:41 -05:00
Patrick Barron
1171b5ab92 Fix user renaming logic 2021-02-16 20:41:53 -05:00
crobibero
407c35f087 Update to dotnet 5.0.3 2021-02-09 19:02:02 -07:00
Patrick Barron
a5e55ba859 Clean up UserManager.AuthenticateUser 2021-02-06 15:59:27 -05:00
crobibero
a087ab389a dotnet 5.0.2 2021-01-16 10:17:33 -07:00
Claus Vium
21d2e9ff0c
Merge pull request #4771 from crobibero/typed-get-preference
Use typed UserManager GetPreference
2020-12-16 22:15:56 +01:00
crobibero
ee23d06154 Use a more descriptive function name 2020-12-13 08:15:26 -07:00
Patrick Barron
d9263dacd5 Enable nullable for Jellyfin.Server.Implementations 2020-12-12 11:20:48 -05:00
crobibero
b670937c3d Use typed UserManager GetPreference 2020-12-11 15:00:43 -07:00
Bond-009
04ba59ab40
Merge pull request #4766 from barronpm/usermanager-async
Convert DeleteUser to async
2020-12-11 21:29:20 +01:00
Patrick Barron
76f61eb0d6 Convert DeleteUser to async 2020-12-11 10:15:43 -05:00
crobibero
aa5fa7cb8f Update to dotnet 5.0.1 2020-12-09 07:36:31 -07:00
crobibero
3db6ae91f6 Add ItemId to all display preferences 2020-12-04 16:00:11 -07:00
crobibero
b0c79edd2c Add support for custom item display preferences 2020-12-03 13:51:12 -07:00
crobibero
6c0188c42b Fix efcore not returning a UTC DateTime 2020-11-25 07:44:11 -07:00
crobibero
5de8c249a0 Don't send activity event if notification type is null 2020-11-23 08:18:07 -07:00
Greenback
9a323f6df0 More spelling corrections. 2020-11-18 13:46:14 +00:00
Bill Thornton
84b0932cfe
Merge pull request #4485 from crobibero/update-user-cache
Update user cache after updating user.
2020-11-16 00:49:53 -05:00
crobibero
3f313206c6 Suggestions from review 2020-11-15 11:35:36 -07:00
crobibero
c70710de32 Update user cache after updating user. 2020-11-15 09:30:04 -07:00
crobibero
73d2cb1c2a Updated based on review feedback 2020-11-13 18:04:06 -07:00
crobibero
95ebb9a55a Use null coalescing when possible 2020-11-13 11:24:46 -07:00
crobibero
5f52a58e78 Convert NullReferenceException to ResourceNotFoundException 2020-11-13 11:14:44 -07:00
crobibero
57b1e93411 Fix nullability errors in Jellyfin.Server.Implementations 2020-11-13 08:32:24 -07:00
crobibero
83629ab6f2 Update packages to net5 2020-11-10 09:52:34 -07:00
Bond-009
51dc92c3a9
Merge pull request #4326 from crobibero/purge-activity-log
Automatically clean activity log database
2020-11-02 16:52:49 +01:00
Patrick Barron
72263613d0 Convert some code in UserManager to async 2020-10-29 20:30:33 -04:00
Bond-009
e37805e82e
Merge pull request #4378 from barronpm/fix-nullref
Fix possible null reference exception
2020-10-30 00:34:28 +01:00
Patrick Barron
d887e42405 Fix possible NullReferenceException 2020-10-29 19:16:39 -04:00
Patrick Barron
67f39ed54f Properly remove profile images 2020-10-27 12:28:37 -04:00
Patrick Barron
f051590f14 Apply suggestions 2020-10-27 12:12:08 -04:00