ip:6544 is not secure it is ignoring parental settings on videos?

Have a MythTV related problem? Ask for help from other MythTV users here.

Moderator: Forum Moderators

Post Reply
mtvf2894
Newcomer
Posts: 13
Joined: Sat Apr 10, 2021 2:33 pm
Great Britain

ip:6544 is not secure it is ignoring parental settings on videos?

Post by mtvf2894 » Mon Apr 12, 2021 1:45 pm

Just tried accessing http://ip:6544 and all Video - Video Gallery (MythVideo) entries are visible completely ignoring the parental settings that are prompted for when using the frontend application?

Does anyone have any ideas on how this could be solved? I have tried looking for a password option in the backend settings but can't find anything that seems related?

v31

Thanks
MythTV v31 / Ubuntu 20.10 / AMD APU

User avatar
paulh
Developer
Posts: 645
Joined: Thu Feb 06, 2014 6:09 pm
Great Britain

Re: ip:6544 is not secure it is ignoring parental settings on videos?

Post by paulh » Mon Apr 12, 2021 5:50 pm

You can password protect some or all the Service API urls but not sure if that is what you are looking for.
viewtopic.php?t=3193

User avatar
bill6502
Developer
Posts: 1897
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: ip:6544 is not secure it is ignoring parental settings on videos?

Post by bill6502 » Tue Apr 13, 2021 1:44 am

In the above, using / will block everything (more than using All). That will prevent
unauthorized access to ipOrHostname:6544 too. But there's nothing to honor
parental settings. 3rd party apps can and have set their own blocking UI.

/, by the way is likely to block UPnP. There's work afoot in master to decouple
UPnP from the API.

mtvf2894
Newcomer
Posts: 13
Joined: Sat Apr 10, 2021 2:33 pm
Great Britain

Re: ip:6544 is not secure it is ignoring parental settings on videos?

Post by mtvf2894 » Tue Apr 13, 2021 11:46 am

I did the following and it seems to have locked down the http pages as it requests username and password now for all pages it seems:

Code: Select all

curl --data AdminPassword=mythtv\&Services=/ http://backend:6544/Myth/ManageUrlProtection
However, when I now try remove the protection all curl commands fail with a 401 error.

I have tried the following but they all output a html page with error 401 unauthorised.

Code: Select all

curl --data AdminPassword=mythtv\&Services=None http://admin:mythtv@backend:6544/Myth/ManageUrlProtection
curl -u admin:mythtv --data AdminPassword=mythtv\&Services=None http://backend:6544/Myth/ManageUrlProtection
curl -u admin --data AdminPassword=mythtv\&Services=None http://backend:6544/Myth/ManageUrlProtection
Any suggestions on how to get the curl commands working again?

I have had the curl commands working again but I was repeating my steps to ensure I understood everything but must have done something different as it isn't now.

Thanks

(v31 / Ubuntu 20.10)
MythTV v31 / Ubuntu 20.10 / AMD APU

User avatar
bill6502
Developer
Posts: 1897
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: ip:6544 is not secure it is ignoring parental settings on videos?

Post by bill6502 » Tue Apr 13, 2021 2:10 pm

Hi,

The default is --basic authentication.

Use: curl --digest --user admin:mythtv --data AdminPassword=mythtv\&Services=None yourBackend:6544/Myth/ManageUrlProtection

mtvf2894
Newcomer
Posts: 13
Joined: Sat Apr 10, 2021 2:33 pm
Great Britain

Re: ip:6544 is not secure it is ignoring parental settings on videos?

Post by mtvf2894 » Tue Apr 13, 2021 5:10 pm

Thanks that has allowed me to set to None now :D

For whatever reason though using / doesn't work now (it returns false) or perhaps it never worked and and it was All that worked.

For reference these are the services I have come across so far. Not sure how to get it back to default where Setup is protected and possibly other menu items but just in case this helps anyone else.

Code: Select all

None
All
/ (not working for me)
Myth
Dvr
Video
MythTV v31 / Ubuntu 20.10 / AMD APU

User avatar
bill6502
Developer
Posts: 1897
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: ip:6544 is not secure it is ignoring parental settings on videos?

Post by bill6502 » Tue Apr 13, 2021 5:26 pm

All = /Capture;/Channel;/Content;/Dvr;/Guide;/Music;/Myth;/Video

/ isn't actually valid, the ManageUrlProtection endpoint returns false, as you found.
Sorry about that. / was removed after a tester used All and MythTV's UPnP was shut
down. I did use SQL to add it just to verify that backend:6544 was protected by
it.

You can look at the setting with: curl yourBackend:6544/Myth/GetSetting?Key=HTTP/Protected/Urls\&HostName=_GLOBAL_

Note that the command line isn't the primary intent of the API, it's more for other clients (apps).

mtvf2894
Newcomer
Posts: 13
Joined: Sat Apr 10, 2021 2:33 pm
Great Britain

Re: ip:6544 is not secure it is ignoring parental settings on videos?

Post by mtvf2894 » Wed Apr 14, 2021 8:24 am

Thanks everyone for help.
MythTV v31 / Ubuntu 20.10 / AMD APU

User avatar
stuarta
Developer
Posts: 218
Joined: Wed Feb 05, 2014 5:13 pm
Great Britain

Re: ip:6544 is not secure it is ignoring parental settings on videos?

Post by stuarta » Wed May 05, 2021 4:04 pm

tbh, i doubt that ever worked. that code only ever reached "mostly complete".
The replacement is currently at "hello world" :)

Post Reply