Project

General

Profile

Bug #4318

User rights / password upgrade from 4.0 to 4.2 fails

Added by Alex Platero over 7 years ago. Updated almost 4 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
User Interface
Target version:
Start date:
2017-04-13
Due date:
% Done:

0%

Estimated time:
Found in version:
4.1-2533
Affected Versions:

Description

Hi,

I can't login to my tvh webui using Microsoft Edge. Same machine, same credentials, login ok from years with Mozilla Firefox. Any ideas? user/password is 100% correct, I get a 401 Unauthorised error every time I try to login from Microsoft Edge.

Using Windows 10 last update (Creators Update). Never tried Edge before.


Files

dumpfile (5.75 KB) dumpfile Alex Platero, 2017-04-22 13:01
2017-04-24_20-23-37.gif (907 KB) 2017-04-24_20-23-37.gif Mark Clarkstone, 2017-04-24 21:28

History

#1

Updated by Dave Travers over 7 years ago

Alex Platero wrote:

Hi,

I can't login to my tvh webui using Microsoft Edge. Same machine, same credentials, login ok from years with Mozilla Firefox. Any ideas? user/password is 100% correct, I get a 401 Unauthorised error every time I try to login from Microsoft Edge.

Using Windows 10 last update (Creators Update). Never tried Edge before.

I also have the same problem (on all versions on Windows 10 except the initial release), for me it's because my tvheadend login user is the same as my username for my microsoft account so edge keeps adding the rest of my microsoft account username to the login box. works fine on IE on the same PC.

Dave

#2

Updated by Alex Platero over 7 years ago

Dave Travers wrote:

Alex Platero wrote:

Hi,

I can't login to my tvh webui using Microsoft Edge. Same machine, same credentials, login ok from years with Mozilla Firefox. Any ideas? user/password is 100% correct, I get a 401 Unauthorised error every time I try to login from Microsoft Edge.

Using Windows 10 last update (Creators Update). Never tried Edge before.

I also have the same problem (on all versions on Windows 10 except the initial release), for me it's because my tvheadend login user is the same as my username for my microsoft account so edge keeps adding the rest of my microsoft account username to the login box. works fine on IE on the same PC.

Dave

Yes, IE login fine in the same PC. It's only a Microsoft Edge issue

#3

Updated by Jaroslav Kysela over 7 years ago

Could you grab the TCP communication (HTTP protocol) trough wireshark or tcpdump ? The decoded TCP stream is enough.

#4

Updated by Jaroslav Kysela over 7 years ago

  • Target version set to 4.4
#5

Updated by Alex Platero over 7 years ago

Jaroslav Kysela wrote:

Could you grab the TCP communication (HTTP protocol) trough wireshark or tcpdump ? The decoded TCP stream is enough.

Hope this works, tcpdump file listening from my tvheadend server (192.168.1.2) on port 9981, receiving a connection from my PC with Edge (192.168.1.231)

#7

Updated by Jaroslav Kysela over 7 years ago

Just for a record, here's the decoded communication:

GET / HTTP/1.1
Accept: text/html, application/xhtml+xml, image/jxr, */*
Accept-Language: es-ES
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36 Edge/15.15063
Accept-Encoding: gzip, deflate
Host: 192.168.1.2:9981
Connection: Keep-Alive

HTTP/1.1 401 Unauthorized
Server: HTS/tvheadend
Cache-Control: no-cache
WWW-Authenticate: Digest realm="tvheadend", qop="auth", nonce="b277ca4350b265cf19e946ff7527e0b8", opaque="2939124794b25f5277a5ac5998584bd6" 
Connection: Keep-Alive
Content-Type: text/html
Content-Length: 199

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>401 Unauthorized</TITLE>
</HEAD><BODY>
<H1>401 Unauthorized</H1>
<P><A HREF="/logout">Default Login</A></P></BODY></HTML>
GET / HTTP/1.1
Accept: text/html, application/xhtml+xml, image/jxr, */*
Accept-Language: es-ES
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36 Edge/15.15063
Accept-Encoding: gzip, deflate
Host: 192.168.1.2:9981
Connection: Keep-Alive

HTTP/1.1 401 Unauthorized
Server: HTS/tvheadend
Cache-Control: no-cache
WWW-Authenticate: Digest realm="tvheadend", qop="auth", nonce="b277ca4350b265cf19e946ff7527e0b8", opaque="2939124794b25f5277a5ac5998584bd6" 
Connection: Keep-Alive
Content-Type: text/html
Content-Length: 199

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>401 Unauthorized</TITLE>
</HEAD><BODY>
<H1>401 Unauthorized</H1>
<P><A HREF="/logout">Default Login</A></P></BODY></HTML>
GET / HTTP/1.1
Accept: text/html, application/xhtml+xml, image/jxr, */*
Accept-Language: es-ES
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36 Edge/15.15063
Accept-Encoding: gzip, deflate
Host: 192.168.1.2:9981
Connection: Keep-Alive

HTTP/1.1 401 Unauthorized
Server: HTS/tvheadend
Cache-Control: no-cache
WWW-Authenticate: Digest realm="tvheadend", qop="auth", nonce="b277ca4350b265cf19e946ff7527e0b8", opaque="2939124794b25f5277a5ac5998584bd6" 
Connection: Keep-Alive
Content-Type: text/html
Content-Length: 199

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>401 Unauthorized</TITLE>
</HEAD><BODY>
<H1>401 Unauthorized</H1>
<P><A HREF="/logout">Default Login</A></P></BODY></HTML>
GET / HTTP/1.1
Accept: text/html, application/xhtml+xml, image/jxr, */*
Accept-Language: es-ES
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36 Edge/15.15063
Accept-Encoding: gzip, deflate
Host: 192.168.1.2:9981
Connection: Keep-Alive

HTTP/1.1 401 Unauthorized
Server: HTS/tvheadend
Cache-Control: no-cache
WWW-Authenticate: Digest realm="tvheadend", qop="auth", nonce="b277ca4350b265cf19e946ff7527e0b8", opaque="2939124794b25f5277a5ac5998584bd6" 
Connection: Keep-Alive
Content-Type: text/html
Content-Length: 199

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>401 Unauthorized</TITLE>
</HEAD><BODY>
<H1>401 Unauthorized</H1>
<P><A HREF="/logout">Default Login</A></P></BODY></HTML>
GET / HTTP/1.1
Accept: text/html, application/xhtml+xml, image/jxr, */*
Accept-Language: es-ES
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36 Edge/15.15063
Accept-Encoding: gzip, deflate
Host: 192.168.1.2:9981
Connection: Keep-Alive

HTTP/1.1 401 Unauthorized
Server: HTS/tvheadend
Cache-Control: no-cache
WWW-Authenticate: Digest realm="tvheadend", qop="auth", nonce="b277ca4350b265cf19e946ff7527e0b8", opaque="2939124794b25f5277a5ac5998584bd6" 
Connection: Keep-Alive
Content-Type: text/html
Content-Length: 199

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>401 Unauthorized</TITLE>
</HEAD><BODY>
<H1>401 Unauthorized</H1>
<P><A HREF="/logout">Default Login</A></P></BODY></HTML>

TVH is fine, the browser should authenticate.

#8

Updated by Mark Clarkstone over 7 years ago

I've had a look into this bug & using the information from the link above I observed the following:

  • If I go direct to the interface, which loads http://ip:9981/extjs.html & login it works fine. I have a basic anonymous account, so the ui loads. Login username is the same as the windows account.
  • After disabling the anon account, clearing all browser data, closing Edge and then loading the ui, I get a login prompt & cannot login. After hitting cancel & clicking default login link, it will eventually let me login after one or two tries.

So I think the solution is rather than just going to http://ip:9981 try loading http://ip:9981/extjs.html instead.

It's just Microsoft doing weird shit again!

#9

Updated by Joe User over 7 years ago

I just tested on my win10 PC and edge works with

192.168.1.10:9981

or
http://192.168.1.10:9981

But when I closed it and opened again, even thought I did not select "save this passowrd", it automatically logged in - leading me to believe it never really closed. So I killed the 4 edge processes which were still running after I closed the window. When I restarted, it asked me for my password and It did not work. After the third time, it finally logged in. (I was very careful to use correct user/password, so it was not a typo...)

Don't have time to capture tcp now, but can later if you think it will help.

#10

Updated by Mark Clarkstone over 7 years ago

Joe User wrote:

I just tested on my win10 PC and edge works with

Are you running the "Creators update"? I am.

[...]
or
[...]

But when I closed it and opened again, even thought I did not select "save this passowrd", it automatically logged in - leading me to believe it never really closed. So I killed the 4 edge processes which were still running after I closed the window. When I restarted, it asked me for my password and It did not work. After the third time, it finally logged in. (I was very careful to use correct user/password, so it was not a typo...)

Don't have time to capture tcp now, but can later if you think it will help.

#11

Updated by Alex Platero over 7 years ago

Tried with http://192.168.1.2:9981/extjs.html, I have a basic UI but can't authenticate with Edge.

Running Windows 10 Creators Update.

#12

Updated by saen acro over 7 years ago

Alex Platero wrote:

Tried with http://192.168.1.2:9981/extjs.html, I have a basic UI but can't authenticate with Edge.

Running Windows 10 Creators Update.

And before Creators Update can't login

#13

Updated by Joe User over 7 years ago

No, still using Anniversary Update (1607) (win10 home edition).

Mark Clarkstone wrote:

Joe User wrote:

I just tested on my win10 PC and edge works with

Are you running the "Creators update"? I am.

[...]
or
[...]

But when I closed it and opened again, even thought I did not select "save this passowrd", it automatically logged in - leading me to believe it never really closed. So I killed the 4 edge processes which were still running after I closed the window. When I restarted, it asked me for my password and It did not work. After the third time, it finally logged in. (I was very careful to use correct user/password, so it was not a typo...)

Don't have time to capture tcp now, but can later if you think it will help.

#14

Updated by Jaroslav Kysela over 7 years ago

If you have any problems, log the network traffic (see comment 3) and eventually provide the contents of CFGDIR/accesscontrol and CFGDIR/passwd, otherwise I cannot help you.

#15

Updated by Mark Clarkstone over 7 years ago

I've done a bit more testing with HTTP Digest off & experience some weird stuff that may be related to this, it could also be related to a commit I made that changes the "Default Login" link to /logout :(.

If you login by going to http://ip:port, which prompts you, you're able to login. The problem comes when you click logout, you're prompted to login again, this is sent to http://ip:port/logout which won't accept anything at all. Most people naturally would click the "Default Login" link on the error page, which of course is a link to /logout!! So we're basically going round in circles :p

The same thing happens with Edge, IE & Chrome..

#16

Updated by saen acro over 7 years ago

There is very strange redirecting used if curl used
ex.

curl http://192.168.1.222:9981
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>Redirect</TITLE>
</HEAD><BODY>
Please follow <a href="extjs.html">extjs.html</a>
</BODY></HTML>

curl http://192.168.1.222:9981/playlist
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>Redirect</TITLE>
</HEAD><BODY>
Please follow <a href="/playlist/channels">/playlist/channels</a>
</BODY></HTML>

curl http://192.168.1.222:9981/xmltv
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>Redirect</TITLE>
</HEAD><BODY>
Please follow <a href="/xmltv/channels">/xmltv/channels</a>
</BODY></HTML>

and if security used

curl http://x.x.biz:9981/
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>401 Unauthorized</TITLE>
</HEAD><BODY>
<H1>401 Unauthorized</H1>
<P><A HREF="/logout">Default Login</A></P></BODY></HTML>

#17

Updated by saen acro over 7 years ago

curl http://192.168.1.222:9981/logout
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>Redirect</TITLE>
</HEAD><BODY>
Please follow <a href="/">/</a>
</BODY></HTML>

#18

Updated by saen acro over 7 years ago

security used

curl http://x.x.biz:9981/logout
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>401 Unauthorized</TITLE>
</HEAD><BODY>
<H1>401 Unauthorized</H1>
<P><A HREF="/logout">Default Login</A></P></BODY></HTML>

ps.
is there a option to have at less 20 min to edit post

#19

Updated by saen acro over 7 years ago

p.p.s.

:9981/playlist
:9981/xmltv

this links are free to all, were are security

#20

Updated by saen acro over 7 years ago

Error reported by Edge

HTML1524
"Invalid DOCTYPE. The shortest valid doctype is "<!DOCTYPE html>"." 

with is html5 error

#21

Updated by Jaroslav Kysela over 7 years ago

To all: it would be good, if you can test latest - v4.3-11-gaec09b6 . I put many fixes for MS browsers inside.

@saen acro: /playlist , /xmltv returns correctly 401 after redirect, if there are no anonymous access:

$ LC_ALL=C wget -O a.txt http://localhost:9981/xmltv
--2017-04-24 18:24:38--  http://localhost:9981/xmltv
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:9981... connected.
HTTP request sent, awaiting response... 302 Found
Location: /xmltv/channels [following]
--2017-04-24 18:24:38--  http://localhost:9981/xmltv/channels
Connecting to localhost (localhost)|::1|:9981... connected.
HTTP request sent, awaiting response... 401 Unauthorized

Username/Password Authentication Failed.
#22

Updated by Mark Clarkstone over 7 years ago

Jaroslav Kysela wrote:

.. snip ..

4.3-11 working great here on Chrome & Edge!

#23

Updated by saen acro over 7 years ago

Jaroslav Kysela wrote:

@saen acro: /playlist , /xmltv returns correctly 401 after redirect, if there are no anonymous access:

But this add one more cycle to logic, and it multiply load if bruteforce used!

#24

Updated by Alex Platero over 7 years ago

Jaroslav Kysela wrote:

To all: it would be good, if you can test latest - v4.3-11-gaec09b6 . I put many fixes for MS browsers inside.

@saen acro: /playlist , /xmltv returns correctly 401 after redirect, if there are no anonymous access:

[...]

Still not being able to login for me with 4.3-15~g95bbbfde9. Same exact issue, login credentials loop.

#25

Updated by Jaroslav Kysela over 7 years ago

I found another issue with my older and slower laptop. Could you try v4.3-16-g137934b ?

#26

Updated by Mark Clarkstone over 7 years ago

Jaroslav Kysela wrote:

..

Still working fine here..

#27

Updated by Alex Platero over 7 years ago

Jaroslav Kysela wrote:

I found another issue with my older and slower laptop. Could you try v4.3-16-g137934b ?

Tried with 4.3-16, the issue persists.

#28

Updated by Alex Platero over 7 years ago

Alex Platero wrote:

Jaroslav Kysela wrote:

I found another issue with my older and slower laptop. Could you try v4.3-16-g137934b ?

Tried with 4.3-16, the issue persists.

And for the record... same issue occurs when I try to login to my oscam webui with Edge :/

#29

Updated by saen acro over 7 years ago

With 4.3-16~g137934b i can login but
Somehow Edge take Windows login user and try with it
in my case I use user saen but when try to login Edge put my online login email as user (where saen are furst 4 simbols)
when use other account it login
still error HTML1527

#30

Updated by Alex Platero over 7 years ago

Just for the record, same behaviour when trying to login with Safari from an iPhone 6S running iOS 10.3.1.

#31

Updated by Alex Platero over 7 years ago

Problem solved, at least in my case.

Seems like users created with earlier versions of tvh (i'm using it from around 3 years ago I think, and always making an update vía yaourt) are unable to login with Edge. I recreated my userlist, same options, same username, same passwords... and now I can login with Edge, Safari and every browser.

#32

Updated by Jaroslav Kysela over 7 years ago

  • Subject changed from Can't login to the webUI with Edge to User rights / password upgrade from 4.0 to 4.2 fails
#33

Updated by Brian Ellis about 7 years ago

Alex Platero wrote:

Problem solved, at least in my case.

Seems like users created with earlier versions of tvh (i'm using it from around 3 years ago I think, and always making an update vía yaourt) are unable to login with Edge. I recreated my userlist, same options, same username, same passwords... and now I can login with Edge, Safari and every browser.

Alex, I think I'm having the same problem. The video that Mark posted above with the 401 unauthorized (asking me to login with name and password) keep popping up and I can't get in to tvheadend. I had, probably just 2 weeks ago, been able to click the app with no trouble. I can't understand what you did to fix the problem. Can you help? Thanks!

#34

Updated by Flole Systems almost 4 years ago

  • Target version changed from 4.4 to 4.6

Also available in: Atom PDF