I'm trying to figure out how safe curl -u
is to use with a real username and password. Investigating the header of such a request, it seems the user name and password are turned into some kind of hash.
In the example below, it seems jujuba:lalalala
is being turned to anVqdWJhOmxhbGFsYWxh
Is this encryption or compression? Is it safe? How does the recipient decode this data?
curl -u jujuba:lalalala -i -X Get http://localhost:80/api/resource -v
* timeout on name lookup is not supported
* Trying 127.0.0.1...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Connected to localhost (127.0.0.1) port 80 (#0)
* Server auth using Basic with user 'jujuba'
> Get /api/resource HTTP/1.1
> Host: localhost
> Authorization: Basic anVqdWJhOmxhbGFsYWxh