Commit graph

458 commits

Author SHA1 Message Date
Mark Monteiro
53380689ad Return correct status codes for authentication and authorization errors
- Use AuthenticatonException to return 401
- Use SecurityException to return 403
- Update existing throws to throw the correct exception for the circumstance
2020-04-13 13:17:46 -04:00
Mark Monteiro
1e1295bebf Merge remote-tracking branch 'upstream/master' into register-services-correctly 2020-04-11 10:00:39 -04:00
Bond_009
d8a7462205 DvdLib: remove dependency on MediaBrowser.Model 2020-04-11 12:33:23 +02:00
Vasily
06c5b73c15
Merge pull request #2755 from Bond-009/dbcleanup
Clean up SqliteItemRepository
2020-04-10 00:20:53 +03:00
dafo90
dd128b5e30 Log message for each exception during login 2020-04-08 17:02:32 +02:00
Vasily
5b59cd2eb2
Merge pull request #2696 from mark-monteiro/fix-extras
Display Extras With Unknown Types
2020-04-07 23:39:31 +03:00
dafo90
62b0db59aa Fix Authentication request log 2020-04-06 22:23:53 +02:00
Bond_009
30ce346f34 Enable nullabe reference types for MediaBrowser.Model 2020-04-05 18:10:56 +02:00
Mark Monteiro
615717e562 Register and construct IUserDataManager and IUserDataRepository correctly 2020-04-04 19:57:26 -04:00
Mark Monteiro
4daa5436fc Register and construct IUserManager and IUserRepository correctly 2020-04-04 19:31:14 -04:00
Mark Monteiro
fe9f4e06d1 Register and construct LibraryManager correctly 2020-04-04 18:28:46 -04:00
Mark Monteiro
7fd25f94f3 Inject and construct ISearchEngine and IMusicManager correctly 2020-04-04 18:22:29 -04:00
Mark Monteiro
573da63d41 Register and construct IMediaSourceManager correctly 2020-04-04 15:28:21 -04:00
Bond_009
8e7b15285e Clean up SqliteItemRepository 2020-04-03 20:59:38 +02:00
Didier Dafond
2fb9e36493
Authentication request log with IP 2020-04-02 22:02:14 +02:00
Mark Monteiro
34204046dd Remove duplicate array of extras directory names 2020-04-01 18:53:53 +02:00
Bond_009
e9d1eabd53 Remove unused usings 2020-03-24 16:12:06 +01:00
Bond-009
94fe9b8f6d
Merge branch 'master' into warn17 2020-03-11 20:26:43 +01:00
Mark Monteiro
b67e9cde8c Replace ILogger with ILogger<T> wherever possible
Log entries will contain additional class context when using this interface
2020-03-03 23:07:10 +01:00
Bond-009
464039043d
Merge pull request #2491 from mark-monteiro/2425-fix-playlists
Fix Playlist Deletion
2020-03-03 14:23:43 +01:00
Vasily
13d30a0a79
Merge pull request #2436 from dkanada/music
Add config options for MusicBrainz
2020-03-02 12:54:17 +03:00
Davide Polonio
5d760b7ee8 Fix emby/user/public API leaking private data
This commit fixes the emby/user/public API that was returning more data
than necessary. Now only the following information are returned:
- the account name
- the primary image tag
- the field hasPassword
- the field hasConfiguredPassword, useful for the first wizard only
(see
https://github.com/jellyfin/jellyfin/issues/880#issuecomment-465370051)
- the primary image aspect ratio

A new DTO class, PrivateUserDTO has been created, and the route has been
modified in order to return that data object.
2020-03-01 21:46:01 +01:00
Mark Monteiro
1204818698 Clean up and document PlaylistResolver 2020-03-01 18:28:19 +01:00
Mark Monteiro
41a26f8ecd Correctly resolve playlists that are stored using a directory path 2020-03-01 18:28:02 +01:00
Bond_009
07cc4be6a7 Fix some warnings
* Add analyzers to MediaBrowser.XbmcMetadata
* Enable TreatWarningsAsErrors for MediaBrowser.XbmcMetadata
* Add analyzers to MediaBrowser.WebDashboard
* Enable TreatWarningsAsErrors for MediaBrowser.WebDashboard
* Disable SA1600 in favor of CS1591
2020-02-23 12:11:43 +01:00
dkanada
6715450598
Merge pull request #2427 from Bond-009/minor
Minor improvements
2020-02-23 10:48:47 +09:00
dkanada
65a9d618cc add config options for musicbrainz 2020-02-22 15:04:52 +09:00
Bond_009
adc9fc282c Minor improvements 2020-02-19 23:08:58 +01:00
Ulrich Wagner
3bd7633cbf
Update Emby.Server.Implementations/Library/LibraryManager.cs
Co-Authored-By: Bond-009 <bond.009@outlook.com>
2020-02-19 19:47:03 +01:00
Ulrich Wagner
a9e744bea0 Curly braces on new lines 2020-02-19 19:41:10 +01:00
Ulrich Wagner
3d9dc59554 Omitting the parameter ExtraChapters 2020-02-19 19:03:42 +01:00
Ulrich Wagner
f4d0fa8dc8
Update Emby.Server.Implementations/Library/LibraryManager.cs
Co-Authored-By: Bond-009 <bond.009@outlook.com>
2020-02-19 18:58:28 +01:00
Ulrich Wagner
d6971581d6
Update Emby.Server.Implementations/Library/LibraryManager.cs
Co-Authored-By: Bond-009 <bond.009@outlook.com>
2020-02-19 17:46:50 +01:00
Ulrich Wagner
0f2ee2686d Constructor of the LibraryManager takes the mediaEncoder as parameter 2020-02-19 16:06:30 +01:00
Ulrich Wagner
b16ba7d985
Update Emby.Server.Implementations/Library/LibraryManager.cs
Co-Authored-By: Bond-009 <bond.009@outlook.com>
2020-02-19 13:40:27 +01:00
Ulrich Wagner
7005326685
Update Emby.Server.Implementations/Library/LibraryManager.cs
Co-Authored-By: Bond-009 <bond.009@outlook.com>
2020-02-19 13:40:06 +01:00
Ulrich Wagner
4d0ee3f6cc
Update Emby.Server.Implementations/Library/LibraryManager.cs
Co-Authored-By: Bond-009 <bond.009@outlook.com>
2020-02-19 13:39:51 +01:00
Ulrich Wagner
39b6d6586f
Update Emby.Server.Implementations/Library/LibraryManager.cs
Co-Authored-By: Bond-009 <bond.009@outlook.com>
2020-02-19 13:37:36 +01:00
Ulrich Wagner
5fed4d10ab Only reading the result of GetMediaInfo if it completed successfully 2020-02-19 08:39:01 +01:00
Ulrich Wagner
d7f199bb1c #2407: Prefer MP4-Metadata for episodes 2020-02-17 14:57:07 +01:00
Bond-009
d5fcca3d05
Merge branch 'master' into naming 2020-02-05 23:28:00 +01:00
dkanada
fe325a6e73
Merge pull request #2359 from Bond-009/username
Allow changing capitalization of usernames
2020-02-03 17:14:50 +09:00
dkanada
692a9bfdd0
update some comments
Co-Authored-By: Bond-009 <bond.009@outlook.com>
2020-02-01 23:36:40 +09:00
dkanada
afe9ed977b improve scan progress and fix a few bugs 2020-02-01 22:44:27 +09:00
Bond_009
acc1846e3e Allow changing capitalization of usernames 2020-01-31 22:56:24 +01:00
Bond_009
dc62e436c4 Clean up Emby.Naming 2020-01-22 22:18:56 +01:00
dkanada
c618f3f8eb
Merge pull request #2257 from Bond-009/cleantests
Fix a couple of tests
2020-01-19 00:08:37 +09:00
dkanada
d217f1614e
Merge pull request #2096 from Bond-009/embytv
Clean up Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs
2020-01-13 00:41:52 +09:00
Bond_009
abf03f7d3a Clean up some more 2020-01-11 22:17:05 +01:00
Vasily
dd7feacd34
Merge pull request #2105 from Bond-009/namingtests
Add back all old emby tests
2020-01-11 02:11:13 +03:00
Bond_009
bb236b9591 Merge branch 'master' into warn12 2020-01-10 21:18:16 +01:00
Bond_009
e714b9930e Merge branch 'master' into embytv 2020-01-10 21:16:46 +01:00
Bond_009
b50c4938e1 Merge branch 'master' into namingtests 2020-01-09 18:26:22 +01:00
Bond_009
a253fa616d Fix build and address comments 2020-01-08 01:23:57 +09:00
dkanada
aca31457c0 merge branch master into media-attachments 2020-01-08 01:21:09 +09:00
dkanada
aac0a1ed26
Merge pull request #2206 from Bond-009/userconfig
Delete user config dir on user deletion
2020-01-04 22:55:42 +09:00
dkanada
fb61a1f882
Merge pull request #2150 from Bond-009/releaseerror
Enable TreatWarningsAsErrors for some projects
2020-01-02 10:13:57 +09:00
dkanada
529cff3920
Merge pull request #2153 from dkanada/fix-playlist
Fix playlist deletion and a few warning fixes
2020-01-01 15:00:57 +09:00
dkanada
c10cb66169
remove directory check 2020-01-01 14:45:09 +09:00
Bond_009
ab57b504fe Delete user config dir on user deletion 2019-12-29 19:32:12 +01:00
Bond_009
7f5a174dff Merge branch 'master' into warn12 2019-12-20 19:43:57 +01:00
Bond-009
6b185119aa
Merge branch 'master' into namingtests 2019-12-17 17:35:27 +01:00
dkanada
28e922326d
remove space
Co-Authored-By: Bond-009 <bond.009@outlook.com>
2019-12-15 13:38:59 +09:00
dkanada
623e85a9e4
add suggested changes
Co-Authored-By: Bond-009 <bond.009@outlook.com>
2019-12-14 22:34:18 +09:00
dkanada
1b2453b4e9 fix playlist deletion 2019-12-14 12:51:27 +09:00
dkanada
02928128b9 track progress for any item that supports the feature 2019-12-14 11:36:06 +09:00
Bond_009
5a8e972952 Enable TreatWarningsAsErrors for some projects
Analyzers are only run in debug build, so setting TreatWarningsAsErrors
for release build will catch the compiler warnings until we resolve all
analyzer warnings.
2019-12-13 20:11:37 +01:00
Bond_009
2ef4ffd698 More warnings (removed) 2019-12-11 00:13:57 +01:00
dkanada
67922dff50
Merge pull request #2041 from Bond-009/warn11
Fix more warnings
2019-12-11 01:14:55 +09:00
Bond-009
affb58ef9e
Apply suggestions from code review
Co-Authored-By: dkanada <dkanada@users.noreply.github.com>
2019-12-10 16:22:03 +01:00
dkanada
dee3076eaf
Merge pull request #1923 from Bond-009/random
Don't shuffle some types by default
2019-12-10 22:28:44 +09:00
Bond_009
35151553e3 Add back all old emby tests 2019-12-06 20:41:39 +01:00
Bond-009
a2c35e6dba Merge remote-tracking branch 'upstream/master' into random 2019-12-06 12:06:13 +01:00
Bond_009
5cab79c839 Clean up Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs 2019-12-04 21:39:27 +01:00
Bond_009
42ffddc269 Fix more warnings 2019-11-27 16:29:56 +01:00
Bond_009
3221e837f9 * Add support for multi segment base urls
* Make baseurl case-insensitive
2019-11-25 11:55:24 +01:00
dkanada
51cdc6ea16
Merge pull request #1926 from Bond-009/auth
Add clearer exceptions, warnings and docs
2019-11-23 01:14:32 +09:00
Bond_009
d7335f6ae6 Reword exception message 2019-11-22 17:02:28 +01:00
Bond-009
b477b3874e Fix some warnings 2019-11-22 16:15:31 +01:00
Bond-009
413ae86dbc Fix easy password 2019-11-21 17:32:29 +01:00
dkanada
f51f59d675
Merge pull request #1965 from Bond-009/dbjson
Deserialize with the correct type (and warning fixes)
2019-11-10 16:51:54 +09:00
dkanada
61b9b4046a
Merge pull request #1929 from Narfinger/parser-fix4
[Draft][Help wanted] Fix parsing of certain names and adds a default season if no season was found
2019-11-08 02:14:01 +09:00
Andrew Mahone
d73f46dcda
Update Emby.Server.Implementations/Library/MediaSourceManager.cs
docs

Co-Authored-By: Bond-009 <bond.009@outlook.com>
2019-11-07 11:27:55 -05:00
Andrew Mahone
8b2d7062c4
Update Emby.Server.Implementations/Library/MediaSourceManager.cs
docs

Co-Authored-By: Bond-009 <bond.009@outlook.com>
2019-11-07 11:24:30 -05:00
Andrew Mahone
193a1fa474
Update Emby.Server.Implementations/Library/MediaSourceManager.cs
docs

Co-Authored-By: Bond-009 <bond.009@outlook.com>
2019-11-07 11:23:28 -05:00
Narfinger
9cd62d661f removed restriction to 3 digits in episodenumber and 4 in season numbers 2019-11-07 10:50:02 +09:00
Andrew Mahone
7110069b39 Return list result directly for MediaAttachments. 2019-11-04 10:37:19 -05:00
Andrew Mahone
1600d5b53f Merge remote-tracking branch 'origin/master' into media-attachments-clean 2019-11-04 10:03:18 -05:00
Bond_009
a245f5a0d4 Rewrite hex encoder/decoder 2019-11-01 17:52:29 +01:00
Bond_009
846857b60e Deserialize with the correct type (and warning fixes) 2019-11-01 17:07:42 +01:00
Bond_009
016be02cd6 More warning fixes 2019-10-29 17:56:05 +01:00
Bond_009
d9a03c9bb1 Fix more warnings 2019-10-29 17:55:16 +01:00
Bond-009
24c076eff3
Update Emby.Server.Implementations/Library/UserViewManager.cs
Co-Authored-By: dkanada <dkanada@users.noreply.github.com>
2019-10-29 17:50:01 +01:00
Andrew Mahone
1513c76a3e Support MediaAttachment retrieval in MediaSourceManager. 2019-10-22 10:35:00 -04:00
Narfinger
4a20260a27 add another parser case and allow parsing of seasonless
Add another parser case and we now allow parsing of seasonless series which hopefully should cover more cases of directory structure
2019-10-22 15:46:35 +09:00
Bond_009
fef35d0505 Add clearer exceptions, warnings and docs 2019-10-20 21:12:03 +02:00
Bond_009
bbc0875387 Don't shuffle some types by default 2019-10-20 16:08:40 +02:00
Bond_009
c9820d30ed Fix multiple mistakes and warnings 2019-09-23 20:32:44 +02:00
Bond-009
6f17a0b7af Remove legacy auth code (#1677)
* Remove legacy auth code

* Adds tests so we don't break PasswordHash (again)
* Clean up interfaces
* Remove duplicate code

* Use auto properties

* static using

* Don't use 'this'

* Fix build
2019-09-17 12:07:15 -04:00
Bond-009
221b831bb2 Reset invalid login counter on successfull login 2019-09-13 17:18:45 +02:00
Joshua Boniface
baa30b41de Add debug logs and try/catch when creating folder 2019-09-02 23:32:03 -04:00
Bond-009
ee637e8fec Fix warnings, improve performance (#1665)
* Fix warnings, improve performance

`QueryResult.Items` is now a `IReadOnlyList` so we don't need to
allocate a new `Array` when we have a `List` (and `Items` shouldn't need to
be mutable anyway)

* Update Providers .csproj to latest C#

* Remove extra newline from DtoService.cs

* Remove extra newline from UserLibraryService.cs
2019-09-02 02:19:29 -04:00
Bond_009
efc4805233 Fix login 2019-08-28 14:45:46 +02:00
Bond_009
24fac4b191 Fix UserNotFoundError 2019-08-18 20:12:25 +02:00
Bond_009
8d3b5c851d Improvements to UserManager 2019-08-16 21:06:11 +02:00
Joshua M. Boniface
a96fa7a5c7
Merge pull request #1397 from Bond-009/passfast
Streamline authentication proccess
2019-08-10 21:42:46 -04:00
Bond-009
6032f31aa6 Use CultureInvariant string conversion for Guids 2019-08-09 23:17:54 +02:00
Bond_009
ab7ef9c9cb Fix style issues 2019-07-06 16:15:38 +02:00
Bond_009
0f897589ed Streamline authentication proccess 2019-07-06 14:52:24 +02:00
dkanada
9e9952d81f
Merge pull request #1247 from bugfixin/master
Adjust detection of 'sample' in filenames to use regex boundaries
2019-07-04 11:38:01 -07:00
Bond_009
d961278b3d Reduce amount of raw sql 2019-06-28 12:14:27 +02:00
Joshua M. Boniface
687255aa31
Merge pull request #1442 from jellyfin/release-10.3.z
Backmerge for Release 10.3.4 and 10.3.5
2019-06-12 23:30:57 -04:00
Joshua M. Boniface
2946ae1009 Revert "Don't set a default reset provider"
This reverts commit c230d49d7c.

This reenables an edge case where an admin might want to reset, with
the default auth provider, the password of an externally-provided
user so they could "unlock" the account while it was failing. There
might be minor security implications to this, but the malicious
actor would need FS access to do it (as they would with any password
resets) so it's probably best to keep it as-is.

Removing this in the first place was due to a misunderstanding
anyways so no harm.
2019-06-09 15:29:43 -04:00
Joshua M. Boniface
4b8f735cb8 Remove superfluous conditional
This wasn't needed to prevent updating the policy on-disk from my
tests and can be removed as suggested by @Bond-009
2019-06-09 13:57:49 -04:00
Joshua M. Boniface
c230d49d7c Don't set a default reset provider 2019-06-09 13:46:53 -04:00
Joshua M. Boniface
20e2cb2d86 Use SecurityException for auth failure 2019-06-09 13:45:51 -04:00
Joshua M. Boniface
b70083f3b3
Apply suggestions from code review
Co-Authored-By: Claus Vium <cvium@users.noreply.github.com>
Co-Authored-By: Bond-009 <bond.009@outlook.com>
2019-06-09 13:41:14 -04:00
Joshua M. Boniface
74ef389879 Add nicer log message and comment 2019-06-09 11:07:35 -04:00
Joshua M. Boniface
d78a55adb4 Implement InvalidAuthProvider
Implements the InvalidAuthProvider, which acts as a fallback if a
configured authentication provider, e.g. LDAP, is unavailable due
to a load failure or removal. Until the user or the authentication
plugin is corrected, this will cause users with the missing provider
to be locked out, while throwing errors in the logs about the issue.

Fixes #1445 part 2
2019-06-08 22:54:31 -04:00
Bond-009
a6f9ceedd8 Fix more warnings 2019-06-01 11:31:27 +02:00
DrPandemic
69ee49bee6 Format correctly the PIN when updating it 2019-05-25 13:46:55 -04:00
Bond-009
2d011b781e
Merge pull request #1383 from jellyfin/release-10.3.z
Backmerge for Release 10.3.3
2019-05-18 12:56:42 +02:00
DrPandemic
c22068d6b1
Fix pin bug introduced in 10.3.z.
The issue is that the new easyPassword format prepends the hash
function. This PR extract the hash from "$SHA1$_hash_".
2019-05-11 19:53:34 -04:00
Bond-009
35d7e97258 Ignore casing photo extensions 2019-05-11 11:55:41 +02:00
bugfixin
1df73fdeba Fix incorrect hasPassword flag when easy pin set 2019-04-30 19:16:53 +00:00
bugfixin
da842d5a73 Fix incorrect escaping in regex pattern 2019-04-19 18:35:28 +00:00
bugfixin
0794a3edf4 Adjust detection of 'sample' in filenames to use regex boundaries 2019-04-19 17:53:51 +00:00
Joshua Boniface
1af9c047fb Override username with AuthenticationProvider
Pass back the Username directive returned by an AuthenticationProvider
to the calling code, so we may override the user-provided Username
value if the authentication provider passes this back. Useful for
instance in an LDAP scenario where what the user types may not
necessarily be the "username" that is mapped in the system, e.g.
the user providing 'mail' while 'uid' is the "username" value.
Could also then be extensible to other authentication providers
as well, should they wish to do a similar thing.
2019-04-07 19:51:45 -04:00
Joshua Boniface
f0fbd0232c Correct bad quote characters 2019-03-29 19:13:01 -04:00
LogicalPhallacy
13e94a8b1b
Remove dashes from pins 2019-03-29 12:48:07 -07:00
Phallacy
2d396cb589 adds readonly to properties 2019-03-29 07:10:49 -07:00
Phallacy
b56031b9f3 fix byte string 2019-03-28 20:49:11 -07:00
Phallacy
48b50a22a4 switched to a hexa string with crypto random backing 2019-03-28 08:15:53 -07:00
Phallacy
5e8496bc59 minor fixes and usings 2019-03-27 22:46:25 -07:00
Bond-009
b07c146fd9
Update Emby.Server.Implementations/Library/DefaultPasswordResetProvider.cs
Co-Authored-By: LogicalPhallacy <44458166+LogicalPhallacy@users.noreply.github.com>
2019-03-27 16:17:18 -07:00
Phallacy
6be8624373 async improvements and post reset cleanups 2019-03-25 22:17:23 -07:00
LogicalPhallacy
740c95d557
Apply minor suggestions from code review
Co-Authored-By: LogicalPhallacy <44458166+LogicalPhallacy@users.noreply.github.com>
2019-03-25 21:40:10 -07:00
Phallacy
86772bd7bd removes needless dictionary 2019-03-24 12:17:32 -07:00
Claus Vium
4e2841f0d7
Update Emby.Server.Implementations/Library/UserManager.cs
Co-Authored-By: LogicalPhallacy <44458166+LogicalPhallacy@users.noreply.github.com>
2019-03-24 11:41:03 -07:00
Phallacy
26fe4040bf fixes some usings 2019-03-24 11:40:00 -07:00
Phallacy
758e35baba greaterthen/lessthen reversal fix 2019-03-24 00:30:16 -07:00
Phallacy
09921a00aa made password resets an interface and per user 2019-03-22 00:01:23 -07:00
Phallacy
80aedcd7e2 really fixed line endings 2019-03-16 21:36:45 -07:00
Phallacy
fc28c9237c fixed line endings 2019-03-16 21:34:26 -07:00
Phallacy
b04200ca68 adding regex fix 2019-03-16 21:21:14 -07:00
Joshua M. Boniface
e3dbed1c1a
Update Emby.Server.Implementations/Library/UserManager.cs
Co-Authored-By: LogicalPhallacy <44458166+LogicalPhallacy@users.noreply.github.com>
2019-03-16 10:16:23 -07:00
Phallacy
7f0fa74467 updated regex to string literal with escaped - 2019-03-16 00:38:31 -07:00
LogicalPhallacy
9df1506794
Merge pull request #2 from LogicalPhallacy/master
update lockoutfix to latest for testing
2019-03-16 00:26:12 -07:00
LogicalPhallacy
2d0844b5db
Merge pull request #1 from jellyfin/master
merging myself to latest
2019-03-16 00:25:16 -07:00
Phallacy
1ee016c997 configurable user lockout 2019-03-16 00:18:52 -07:00