tags:

views:

76

answers:

3
http://admin:[email protected]/videostream.cgi

I've never known that user/pass can be set directly in the url,anyone can explain how it works,is it standard, or give a term to google with?

+4  A: 

It's a standard way of providing login credentials in the URL so it doesn't have to prompt you for them.

admin is the username, 123456 is the password. The hostname is 192.168.1.178 as usual. You're connecting through the http protocol, so HTTP authentication is used here to access the script.

BoltClock
BTW, do you know how to configure HTTP authentication in apache ?
Alan
Is it safe? For example, can I save a bookmark to access a `phpMyAdmin` with the user/password on the url like that?
BrunoLM
@BrunoLM: no, it isn't, and I don't think that's its intended use. It can be useful when providing URI-based connection strings instead, for example.
BoltClock
@Alan: I'm not sure about that, sorry.
BoltClock
IIRC this kind of automatic authentication was discontinued from IE7 onwards because it was percieved to be a big security risk, and at the time IE was pretty much the only browser that supported it.
slugster
+1  A: 

It's just a normal URL. See here for the URL syntax: http://en.wikipedia.org/wiki/Uniform_Resource_Locator#Syntax

Bytecode Ninja
+3  A: 

It's the authority part of a URI scheme defined by RFC3986.

http://tools.ietf.org/html/rfc3986#section-3.2

fseto