FAQ  •  Register  •  Login

Mediabrowser Password In URL

<<

cerothen

Streaming enthusiast

Posts: 20

Joined: Sat Dec 29, 2012 2:37 pm

Post Fri Aug 08, 2014 7:18 pm

Mediabrowser Password In URL

Good Afternoon Zip,

I have a quick request that should be fairly easy to fulfil should you deem it reasonable. I have been using owncloud for a while and have that working as I want however I setup an "external site" for mediabrowser. It would be nice if I could specify the password as part of the URL so that users wouldn't have to authenticate twice.

Something like the below would be perfect:

https://hostname.TLD/mediabrowser?pass={password}

Thanks for your time and keep up the great work on my favourite media server!
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Sun Aug 10, 2014 10:38 pm

Re: Mediabrowser Password In URL

Doesn't the Remember Me functionality work?
<<

atc98092

User avatar

DLNA master

Posts: 5432

Joined: Fri Aug 17, 2012 10:22 pm

Location: Washington (the state)

Post Mon Aug 11, 2014 1:04 am

Re: Mediabrowser Password In URL

Petr, I've had issues with the Remember Me, as in no, it isn't working. Just tried it from this browser on a different tab. Didn't even close the browser, only the tab. Reloading MB on a new tab asked for the password again.

WIndows 7, IE 11.
Dan

LG NANO85 4K TV, Samsung JU7100 4K TV, Sony BDP-S3500, Sharp 4K Roku TV, Insignia Roku TV, Roku Ultra, Premiere and Stick, Nvidia Shield, Yamaha RX-V583 AVR.
Primary server: AMD Ryzen 5 5600GT, 32 gig ram, Windows 11 Pro, 22 TB hard drive space | Test server: Intel i5-6400, 16 gig ram, Windows 10 Pro

HOWTO: Enable debug logging HOWTO: Identify media file contents
<<

cerothen

Streaming enthusiast

Posts: 20

Joined: Sat Dec 29, 2012 2:37 pm

Post Mon Aug 11, 2014 11:47 am

Re: Mediabrowser Password In URL

zip wrote:Doesn't the Remember Me functionality work?


Good morning Petr,

Typically the remember me function would be a suitable solution however for myself and anyone who I provide access might not be using their own computer (eg they might be at school or otherwise). Considering Owncloud doesn't put the link directly into the URL bar it would also give me the chance to create a more complex password that I wouldn't directly indicate to those that I have given access (they would be authenticated when signing into owncloud [Which is intern authenticated against their windows user accounts]). The individuals that I provide access to are not the most tech savvy and will not think/know how to dig through the page source for the password.

This collectively would be a positive as well as it would give me the ability to have some level of user access control (individual usernames and passwords) while also providing a more seamless experience.

Based on the above I would appreciate if you would consider my request.

Thanks for your time!
<<

spudy12

DLNA master

Posts: 234

Joined: Thu Oct 18, 2012 7:07 pm

Post Mon Aug 11, 2014 11:02 pm

Re: Mediabrowser Password In URL

atc98092 wrote:Petr, I've had issues with the Remember Me, as in no, it isn't working. Just tried it from this browser on a different tab. Didn't even close the browser, only the tab. Reloading MB on a new tab asked for the password again.

WIndows 7, IE 11.


Not having any issues with remember me over here, forgot MB even had a password. Perhaps try chrome / firefox?

I don't think having the password in the URL is a good idea at all, just asking for security related issues.
<<

atc98092

User avatar

DLNA master

Posts: 5432

Joined: Fri Aug 17, 2012 10:22 pm

Location: Washington (the state)

Post Tue Aug 12, 2014 1:40 am

Re: Mediabrowser Password In URL

spudy12 wrote:
atc98092 wrote:Petr, I've had issues with the Remember Me, as in no, it isn't working. Just tried it from this browser on a different tab. Didn't even close the browser, only the tab. Reloading MB on a new tab asked for the password again.

WIndows 7, IE 11.


Not having any issues with remember me over here, forgot MB even had a password. Perhaps try chrome / firefox?

I don't think having the password in the URL is a good idea at all, just asking for security related issues.


I agree that a password in the URL is a bad security idea. Personally, even it were sent over HTTPS, I'd be nervous about it.

I've tried Firefox as well. MediaBrowser isn't saving the password for me.
Dan

LG NANO85 4K TV, Samsung JU7100 4K TV, Sony BDP-S3500, Sharp 4K Roku TV, Insignia Roku TV, Roku Ultra, Premiere and Stick, Nvidia Shield, Yamaha RX-V583 AVR.
Primary server: AMD Ryzen 5 5600GT, 32 gig ram, Windows 11 Pro, 22 TB hard drive space | Test server: Intel i5-6400, 16 gig ram, Windows 10 Pro

HOWTO: Enable debug logging HOWTO: Identify media file contents
<<

cerothen

Streaming enthusiast

Posts: 20

Joined: Sat Dec 29, 2012 2:37 pm

Post Tue Aug 12, 2014 2:46 am

Re: Mediabrowser Password In URL

As it seems that having access to putting the password into the URL seems to risky does anyone have a method that they can share with me to create a page (probably using PHP so that I can confirm access using session variables) that would authenticate on the user's behalf and provide to them a token to use for the duration of their session (which would be though the normal mediabrowser interface)?

I know basically nothing about javascript but I would be willing to work on expanding on something if there was a simple authentication script to get me started.

Thanks!
<<

will

DLNA master

Posts: 2138

Joined: Mon Aug 30, 2010 11:18 am

Location: UK

Post Tue Aug 12, 2014 7:15 am

Re: Mediabrowser Password In URL

Everything, including URLs are encrypted when using HTTPS, so it would be fine.


MediaBrowser posts the transformed login details to the /cds/login endpoint, and then stores the resulting authToken in a cookie.

So working backwards,

1) Copy the cookie from a valid session
2) Write some code (php?) to inject the cookie
3) Test to see if you are automatically logged in
4) Write some javascript to perform the login process and generate a cookie
5) Test to see if you are automatically logged in
6) Adapt the code to only generate a new cookie if you don't have one already

Login process documentation http://docs.serviiocds.apiary.io/#login
Will

ServiiDroid (Android Console) Developer: Download | Home | Support
ServiiGo (Android 3G/4G/WiFi Playback App) Developer: Download | Home | Support
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Thu Aug 14, 2014 3:50 pm

Re: Mediabrowser Password In URL

Also the next version will have a switch in the startup options to disable password altogether - not sure if that would help.
<<

atc98092

User avatar

DLNA master

Posts: 5432

Joined: Fri Aug 17, 2012 10:22 pm

Location: Washington (the state)

Post Fri Aug 15, 2014 3:20 am

Re: Mediabrowser Password In URL

zip wrote:Also the next version will have a switch in the startup options to disable password altogether - not sure if that would help.


One thought: could the password be disabled if the player requesting is on the same network, but require a password if outside? Then when I am traveling and want to watch a movie from home I can get to it from the Internet, and others won't be eating my bandwidth. Then if I want to play it from something on my home network it wouldn't ask.
Dan

LG NANO85 4K TV, Samsung JU7100 4K TV, Sony BDP-S3500, Sharp 4K Roku TV, Insignia Roku TV, Roku Ultra, Premiere and Stick, Nvidia Shield, Yamaha RX-V583 AVR.
Primary server: AMD Ryzen 5 5600GT, 32 gig ram, Windows 11 Pro, 22 TB hard drive space | Test server: Intel i5-6400, 16 gig ram, Windows 10 Pro

HOWTO: Enable debug logging HOWTO: Identify media file contents
<<

cerothen

Streaming enthusiast

Posts: 20

Joined: Sat Dec 29, 2012 2:37 pm

Post Sun Aug 17, 2014 12:48 pm

Re: Mediabrowser Password In URL

zip wrote:Also the next version will have a switch in the startup options to disable password altogether - not sure if that would help.


Good Morning Zip,

I suspect that should be able to be made to meet my needs. I could make it so that the rewriting proxy will fail a condition without first authenticating against my own form (in this case owncloud). I will wait for the next release and see if I can make it meet my needs. Thanks for your input!

will wrote:Everything, including URLs are encrypted when using HTTPS, so it would be fine.


MediaBrowser posts the transformed login details to the /cds/login endpoint, and then stores the resulting authToken in a cookie.

So working backwards,

1) Copy the cookie from a valid session
2) Write some code (php?) to inject the cookie
3) Test to see if you are automatically logged in
4) Write some javascript to perform the login process and generate a cookie
5) Test to see if you are automatically logged in
6) Adapt the code to only generate a new cookie if you don't have one already

Login process documentation http://docs.serviiocds.apiary.io/#login


Thanks Will,

I will try my hand as it. I have been interested in learning about the various components required and will be happy to give it a try. I appreciate you outlining the steps for me.

Return to Feature requests

Who is online

Users browsing this forum: No registered users and 14 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.