Commit graph

1076 commits

Author SHA1 Message Date
Szymon Acedański b1e8a8565f
Update Jellyfin.Api/Helpers/FileStreamResponseHelpers.cs
Co-authored-by: Claus Vium <cvium@users.noreply.github.com>
2021-03-24 22:46:08 +01:00
Szymon Acedański 136136dea9 Fix incorrect responses for HEAD /audio/<id>/stream
Without this fix my Samsung Soundbar (HW-Q80R) fails to play using DLNA
and returns "Error: Resource not found (716)" instead.

I had a look on tcpdump network logs between Jellyfin and the soundbar
and noticed that the device performs a HEAD request for the media before
responding to the DLNA UPNP control request from Jellyfin (or BubbleUPNP
Android App).

Jellyfin retuns 204 No Content response, which is unusual.  Common web
servers generally return 200 OK if the GET would return content, and
this is not-very-clearly suggested [in HTTP
spec](https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1)

The other patch is to ensure, that invalid Content-Length: 0 is not
returned with the HEAD response in the streaming case.

I think in both cases we still don't return the same headers with HEAD
as with GET (e.g. Content-Length or Accept-Ranges), but at least we
don't return anything misleading.
2021-03-24 20:43:54 +01:00
Erwin de Haan 1f3aa3fe6f Apply review suggestions 2021-03-20 01:28:14 +01:00
Erwin de Haan 239a7156cc Fix arbitrary image file reads in ImageByNameController
GHSL-2021-050: Issue 4 Arbitrary image file read and directory traversal.
2021-03-20 01:14:59 +01:00
Erwin de Haan f61d18612b Fix directory traversal in the HlsSegmentController in a fairly rudimentary but working way.
GHSL-2021-050: Issue 1,2,3 Arbitrary file read and directory traversal.
The segment id's can probably just be verified to be an actual ID or to not contain any forward or backward slashes
2021-03-20 01:14:59 +01: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 0e5d4a3bcf
Merge pull request #5422 from Bond-009/warn51 2021-03-14 00:41:40 +01:00
Bond-009 8bb2420a25
Merge pull request #5518 from crobibero/missing-endpoints
Add missing InstantMix endpoints
2021-03-13 22:59:47 +01:00
Bond_009 a8ed753f6c FxCop -> Net Analyzers (part 2) 2021-03-13 22:33:28 +01:00
crobibero 9ac9543ee2 Add missing InstantMix endpoints 2021-03-13 09:09:22 -07:00
Bond-009 260b48ef9d
Merge pull request #5515 from jellyfin/fix-refresh-endpoint
fix refresh endpoint
2021-03-13 15:07:42 +01:00
Claus Vium fe2a310fe2
fix refresh endpoint
It was originally a POST 9af6eda0b4/MediaBrowser.Api/Library/LibraryService.cs (L155)
2021-03-13 09:13:45 +01:00
crobibero eef15dc7ac Fix third part integration 2021-03-11 22:45:58 -07:00
Claus Vium 5592967497
Merge pull request #5403 from BaronGreenback/DLNAProfileFix 2021-03-10 11:50:08 +01:00
BaronGreenback 84da57cd48
Update StreamingHelpers.cs
Updated condition
2021-03-10 09:07:11 +00:00
David ece0d67f99 Use FileShare.Read for log files 2021-03-09 17:31:31 +01:00
Bond_009 9ed7f429c0 FxCop -> Net Analyzers (part 1) 2021-03-09 03:04:47 +01:00
BaronGreenback 75c9659e05 Fix unreachable code & assign id to each profile. 2021-03-07 14:17:32 +00:00
David 60ffa6f514 Use FileShare.None when creating files 2021-03-07 14:43:28 +01:00
Patrick Barron f638ee6b09 Enable nullable for Jellyfin.Data and remove unnecessary attributes 2021-03-06 17:43:01 -05:00
Bond-009 e839929b91
Merge pull request #5380 from Bond-009/plugins
100% branch coverage for DashboardController
2021-03-06 00:59:28 +01:00
Bond-009 3741be51ec
Merge pull request #5383 from cvium/fix-mergeversions-overflow
do not pick a linked item as primary when merging versions
2021-03-05 21:57:22 +01:00
cvium 59814bd55e do not pick a linked item as primary when merging versions 2021-03-05 19:57:48 +01:00
Claus Vium d0a2d00b29
Fix UpdateMediaPath model binding (#5378) 2021-03-05 16:56:21 +01:00
Bond_009 a6d0db5d04 100% branch coverage for DashboardController 2021-03-05 11:15:14 +01:00
crobibero 858c91ab48 Specify defaults or set query parameter to nullable 2021-03-04 18:25:52 -07:00
BaronGreenback d819a1d928
Remove Content-Length header from DLNA HEAD request (#5335) 2021-03-03 15:41:18 +01:00
Bond-009 c2af32d035
Merge pull request #5299 from Bond-009/tests13 2021-03-01 18:51:09 +01:00
Bond_009 914e891689 Fix unchecked input 2021-02-24 02:05:12 +01:00
Bond_009 aff0aea60f Improve branch coverage 2021-02-23 14:14:02 +01:00
Joshua M. Boniface 7ece3c5523
Merge pull request #5273 from Bond-009/warn31 2021-02-22 21:00:46 -05:00
Joshua M. Boniface c0c4aff8a6
Merge pull request #5276 from Bond-009/minor12 2021-02-22 21:00:34 -05:00
Joshua M. Boniface da55462d92
Merge pull request #5291 from Bond-009/tests12 2021-02-22 21:00:15 -05:00
dependabot[bot] 875e02318c
Bump Swashbuckle.AspNetCore from 6.0.5 to 6.0.7
Bumps [Swashbuckle.AspNetCore](https://github.com/domaindrivendev/Swashbuckle.AspNetCore) from 6.0.5 to 6.0.7.
- [Release notes](https://github.com/domaindrivendev/Swashbuckle.AspNetCore/releases)
- [Commits](https://github.com/domaindrivendev/Swashbuckle.AspNetCore/compare/v6.0.5...v6.0.7)

Signed-off-by: dependabot[bot] <support@github.com>
2021-02-22 16:11:56 +00:00
Bond_009 ec3237ba55 Fix tests 2021-02-22 13:46:40 +01:00
Bond_009 57102090d3 Add tests for DashboardController 2021-02-22 13:15:29 +01:00
dependabot[bot] 29fb2c57c8
Bump Swashbuckle.AspNetCore.ReDoc from 6.0.5 to 6.0.7
Bumps [Swashbuckle.AspNetCore.ReDoc](https://github.com/domaindrivendev/Swashbuckle.AspNetCore) from 6.0.5 to 6.0.7.
- [Release notes](https://github.com/domaindrivendev/Swashbuckle.AspNetCore/releases)
- [Commits](https://github.com/domaindrivendev/Swashbuckle.AspNetCore/compare/v6.0.5...v6.0.7)

Signed-off-by: dependabot[bot] <support@github.com>
2021-02-22 12:00:48 +00:00
Bond_009 b1fe28d0a6 Use GetEncodingOptions where possible 2021-02-21 02:58:30 +01:00
Bond_009 eba859e33e Minor improvements 2021-02-21 02:49:52 +01:00
Bond_009 40b9e7592f Fix build 2021-02-20 23:34:15 +01:00
Bond_009 141efafd3d Enable TreatWarningsAsErrors for MediaBrowser.Model 2021-02-20 23:29:33 +01:00
dkanada 13d65318eb
Merge pull request #5223 from Bond-009/minor10
Minor improvements
2021-02-20 10:56:55 +09:00
dkanada 175e2a5249
Merge pull request #5242 from jellyfin/cancellationtokens
Properly forward cancellationTokens
2021-02-20 10:52:30 +09:00
crobibero 6ad2544a30 Bump Swashbuckle.AspNetCore to 6.0.5 2021-02-15 10:07:50 -07:00
Bond_009 e9f22303a4 Properly forward cancellationTokens 2021-02-15 14:19:17 +01:00
dependabot[bot] 7feef9a01b
Bump Swashbuckle.AspNetCore.ReDoc from 6.0.2 to 6.0.5
Bumps [Swashbuckle.AspNetCore.ReDoc](https://github.com/domaindrivendev/Swashbuckle.AspNetCore) from 6.0.2 to 6.0.5.
- [Release notes](https://github.com/domaindrivendev/Swashbuckle.AspNetCore/releases)
- [Commits](https://github.com/domaindrivendev/Swashbuckle.AspNetCore/compare/v6.0.2...v6.0.5)

Signed-off-by: dependabot[bot] <support@github.com>
2021-02-15 12:00:48 +00:00
Bond-009 6616add8c8
Merge pull request #5213 from Bond-009/tests9
Add tests for RequestHelpers.GetItemTypeStrings
2021-02-13 11:10:28 +01:00
Bond_009 65bab55ca0 Minor improvements 2021-02-13 00:39:18 +01:00
dkanada 9fcdbd4c4b remove deprecated settings from server config 2021-02-12 21:58:37 +09:00
Bond_009 97935d2cd2 Add tests for RequestHelpers.GetItemTypeStrings 2021-02-11 18:21:08 +01:00