Project

General

Profile

Bug #4542

Access denied to status.xml (401 HTTP Error)

Added by B. J. over 7 years ago. Updated over 7 years ago.

Status:
Invalid
Priority:
Normal
Assignee:
-
Category:
User Interface
Target version:
-
Start date:
2017-08-23
Due date:
% Done:

0%

Estimated time:
Found in version:
4.3-347~g4a35523
Affected Versions:

Description

Get an 401 HTTP Error (unauthorized) when I try to read the status.xml of tvheadend via http even when I was logged in (as admin) in the user interface.

http://ip.of.tvh:9981/status.xml

I check the content of status.xml in my kodi addon (TVH Recording Manager). I would be very grateful if this works again.


Files

Bildschirmfoto von »2017-08-23 08-50-19«.png (79.3 KB) Bildschirmfoto von »2017-08-23 08-50-19«.png Screenshot B. J., 2017-08-23 08:52
img.PNG (24.3 KB) img.PNG saen acro, 2017-08-23 08:54

History

#1

Updated by Jaroslav Kysela over 7 years ago

  • Status changed from New to Invalid

If you do HTTP requests, then almost all URLs are handled through ACL, so make sure that your client sends valid credentals (username, password) to TVH (basic or digest auth) in the HTTP request.

#2

Updated by B. J. over 7 years ago

You cannot login if you point to status.xml, even through a web browser (e.g. chrome or firefox), all login attempts are rejected.

#3

Updated by saen acro over 7 years ago

I tested and it request login on any browser.
Are you use any browser filtering?

#4

Updated by saen acro over 7 years ago

Latest version in github is 4.3-334~g7db25fab0 your is 4.3-347~g4a35523 ?

#5

Updated by B. J. over 7 years ago

Yes but all login requests are rejected if you directly point to <tvh.server>:9981/status.xml
I don't use browser filtering. I can login into the UI of course.

#7

Updated by Jaroslav Kysela over 7 years ago

Wget works - tested right now (replace admin:admin with your username:password):

wget http://admin:admin@localhost:9981/status.xml
#8

Updated by saen acro over 7 years ago

Is your newest version include yesterday(2017-08-22) commits?
https://tvheadend.org/projects/tvheadend/activity?utf8=✓&show_changesets=1&with_subprojects=0&with_subprojects=1

They are not in github ???

#9

Updated by B. J. over 7 years ago

Yes, I have updated this today in the morning via apt-get. My sources.list:

deb https://dl.bintray.com/tvheadend/deb trusty unstable

@Jaroslav Kysela: wget doesn't work.

First try - point to status.xml (I have replaced login/pw with ***):

kodi@mk-xbmc2:~$ wget http://*****:*****@mk-pc-futro01/status.xml
--2017-08-23 08:57:52--  http://futro:*password*@mk-pc-futro01/status.xml
Resolving mk-pc-futro01 (mk-pc-futro01)... 141.55.210.208
Connecting to mk-pc-futro01 (mk-pc-futro01)|141.55.210.208|:80... failed: Connection refused.
kodi@mk-xbmc2:~$ wget http://futro:futro@mk-pc-futro01:9981/status.xml
--2017-08-23 08:58:17--  http://futro:*password*@mk-pc-futro01:9981/status.xml
Resolving mk-pc-futro01 (mk-pc-futro01)... 141.55.210.208
Connecting to mk-pc-futro01 (mk-pc-futro01)|141.55.210.208|:9981... connected.
HTTP request sent, awaiting response... 401 Unauthorized
Reusing existing connection to mk-pc-futro01:9981.
HTTP request sent, awaiting response... 401 Unauthorized

Username/Password Authentication Failed.

Second try, directly to extjs.html (login/pw are the same):

kodi@mk-xbmc2:~$ wget http://*****:*****@mk-pc-futro01:9981/
--2017-08-23 08:59:10--  http://futro:*password*@mk-pc-futro01:9981/
Resolving mk-pc-futro01 (mk-pc-futro01)... 141.55.210.208
Connecting to mk-pc-futro01 (mk-pc-futro01)|141.55.210.208|:9981... connected.
HTTP request sent, awaiting response... 302 Found
Location: extjs.html [following]
--2017-08-23 08:59:10--  http://futro:*password*@mk-pc-futro01:9981/extjs.html
Reusing existing connection to mk-pc-futro01:9981.
HTTP request sent, awaiting response... 401 Unauthorized
Reusing existing connection to mk-pc-futro01:9981.
HTTP request sent, awaiting response... 200 OK
Length: 802 [text/html]
Saving to: ‘index.html.1’

100%[=======================================================================>] 802         --.-K/s   in 0s      

2017-08-23 08:59:10 (148 MB/s) - ‘index.html.1’ saved [802/802]

#10

Updated by saen acro over 7 years ago

curl http://172.31.90.254:9981/status.xml
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>401 Unauthorized</TITLE>
</HEAD><BODY>
<H1>401 Unauthorized</H1>
<P STYLE="text-align: center; margin: 2em"><A HREF="/" STYLE="border: 1px solid; border-radius: 4px; pa                                                                 dding: .6em">Default login</A></P><P STYLE="text-align: center; margin: 2em"><A HREF="/login" STYLE="bo                                                                 rder: 1px solid; border-radius: 4px; padding: .6em">New login</A></P></BODY></HTML>
# curl http://user:[email protected]:9981/status.xml
<?xml version="1.0"?>
<currentload>
<systemload>0.450000,0.570000,0.580000</systemload>
<recordings>
<recording>
<next>733</next>
</recording>
</recordings>
<subscriptions>1</subscriptions>
#11

Updated by B. J. over 7 years ago

Back to 4.2.3 - configuration unchanged:

curl http://*****:*****@mk-pc-futro01:9981/status.xml
<?xml version="1.0"?>
<currentload>
<systemload>0.170000,0.250000,0.440000</systemload>
<recordings>
</recordings>
<subscriptions>0</subscriptions>

Also available in: Atom PDF