Bug #5416
closedWebUI: URI /special/srvid2 not working, wrong status code logged [master git]
Added by da h4xX0rz1sT over 7 years ago. Updated over 7 years ago.
100%
Description
-tvh always logs "403", no matter whether the server replies 401 or 403
-no matter whether you allow plain, digest or both
-no matter if cookies are enabled or not
-related with #5391
wget http://<ip>:<port>/ --user=<myadminuser> --pass=<mypass> # works as expected wget http://<ip>:<port>/special/srvid2 # 401 as expected, 403 logged wget http://<ip>:<port>/special/srvid2 --user=<myadminuser> --pass=<mypass> # 403, expected 200
HTH,
/HXZ
Updated by Jaroslav Kysela over 7 years ago
Actions
#1
No idea:
$ wget -O srvid2 http://localhost:9981/special/srvid2 --user=admin --password=admin 2018-12-11 13:17:01 (69.3 MB/s) - 'srvid2' saved [290559/290559]
$ wget -O srvid2 http://localhost:9981/special/srvid2 HTTP request sent, awaiting response... 401 Unauthorized
$ wget -O srvid2 http://localhost:9981/special/srvid2 --user=admin_wrong --password=admin HTTP request sent, awaiting response... 403 Forbidden
What '--trace http' shows in log ?
Updated by Jaroslav Kysela over 7 years ago
Actions
#2
--trace http,access (both)
Updated by Jaroslav Kysela over 7 years ago
Actions
#3
It looks like you enter wrong username/password.
Updated by da h4xX0rz1sT over 7 years ago
Actions
#4
Jaroslav Kysela wrote:
It looks like you enter wrong username/password.
Definitely not. I've triple checked it, fetching cmd line from shell history I just remove "/special/srvid2" part and it works. If you look into #5391, it seems there are other people experiencing this issue, too.
Trace "wget http://127.0.0.1:9981/special/srvid2 --user=<myadminuser> --pass=<mypass>" (wget from localhost):
Dec 11 13:26:17 TVHserver tvheadend[16985]: http: HTTP/1.1 GET /special/srvid2{{User-Agent=Wget/1.18 (linux-gnueabihf),Accept=*/*,Accept-Encoding=identity,Host=localhost:9981,Connection=Keep-Alive}}
Dec 11 13:26:17 TVHserver tvheadend[16985]: access: 127.0.0.1:<no-user> [ ], conn=0:s0:r0:l2, profile=ANY, dvr=ANY, exclude tag=ANY, tag=ANY
Dec 11 13:26:17 TVHserver tvheadend[16985]: http: 127.0.0.1: HTTP/1.1 GET (1) /special/srvid2 -- 401
Dec 11 13:26:17 TVHserver tvheadend[16985]: http: HTTP/1.1 GET /special/srvid2{{User-Agent=Wget/1.18 (linux-gnueabihf),Accept=*/*,Accept-Encoding=identity,Host=localhost:9981,Connection=Keep-Alive,Authorization=Digest}}
Dec 11 13:26:17 TVHserver tvheadend[16985]: access: admin:<no-user> [ ], conn=0:s0:r0:l2, profile=ANY, dvr=ANY, exclude tag=ANY, tag=ANY
Dec 11 13:26:17 TVHserver tvheadend[16985]: http: 127.0.0.1: HTTP/1.1 GET (1) /special/srvid2 -- 403
Trace (Firefox from remote host):
Dec 11 13:41:11 TVHserver tvheadend[16985]: http: HTTP/1.1 GET /special/srvid2{{Host=192.168.XXX.XXX:9981,User-Agent=Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0,Accept=text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8,Accept-Language=de,en-US;q=0.7,en;q=0.3,Accept-Encoding=gzip, deflate,DNT=1,Authorization=Digest,Connection=keep-alive,Upgrade-Insecure-Requests=1}}
Dec 11 13:41:11 TVHserver tvheadend[16985]: access: admin:admin [SATWRELDF *], conn=0:s0:r0:l2, matched, profile='pass','audio','copy-for-recording-matroska','htsp','matroska','webtv-h265-aac-matroska', dvr=ANY, exclude tag=ANY, tag=ANY
Dec 11 13:41:11 TVHserver tvheadend[16985]: http: 192.168.YYY.YYY: HTTP/1.1 GET (1) /special/srvid2 -- 403
HTH,
/HXZ
Updated by Jaroslav Kysela over 7 years ago
Actions
#5
Do you have some special characters in your password? It seems that tvh does not understand your entered password from the command line (escaping issue?).
Updated by Jaroslav Kysela over 7 years ago
Actions
#6
Sorry - I see the 403 problem also for firefox.. But the cmd authentication is wrong in your case.
Updated by da h4xX0rz1sT over 7 years ago
Actions
#7
In Firefox, I have tvh open in a pinned tab. So when I open "/special/srvid", it immediately sends (working) authentication without asking (again) for a password. TVh replies 403 instead serving the file.
No special characters in password which could (will) be a problem if not properly quoted.
Admin flag is also set for admin user.
HTH,
/HXZ
Updated by Jaroslav Kysela over 7 years ago
Actions
#8
- Status changed from New to Fixed
- % Done changed from 0 to 100
Applied in changeset commit:tvheadend|f3d57ee05ce55584545334cb44f7a5f0a3d2bfd9.
Updated by da h4xX0rz1sT over 7 years ago
Actions
#9
Confirm. Fixed in 4.3-1654~gd7669cf06.
We have a working srvid2, awesome :)
Thank you once more, Jaroslav :)
/HXZ
Updated by saen acro over 7 years ago
Actions
#10
wget -O srvid2 http://localhost:9981/special/srvid2 --2018-12-11 23:28:29-- http://localhost:9981/special/srvid2 Преобразувам localhost (localhost)... ::1, 127.0.0.1 Свързване към localhost (localhost)|::1|:9981... неуспя: Отказано свързване. Свързване към localhost (localhost)|127.0.0.1|:9981... успешно свързване. HTTP изпратено искане, чакам отговор... 200 OK Дължина: неопределен [text/plain] Saving to: ‘srvid2’ srvid2 [ <=> ] 0 --.-KB/s
5min nothing
4.3-1656~g1d40f21
Updated by Pablo R. over 7 years ago
Actions
#11
da h4xX0rz1sT wrote:
Confirm. Fixed in 4.3-1654~gd7669cf06.
We have a working srvid2, awesome :)
Thank you once more, Jaroslav :)
Working here too.
/HXZ