strip_passwd partial commit

Pavel Shirshov (pchel) me at pavelsh.pp.ru
Tue Nov 9 06:22:12 UTC 2004


Hello Jindrich,

Thursday, November 4, 2004, 6:48:15 PM, you wrote:

>>        util.c(strip_password()) - need some additional testing. For
>>        example around:
>> -        at = strrchr (p, '@');
>> +       at = memchr (p, '@', host_len);
>> 
>>        It's not equal operations.

JN> Yes, they're not equal, because I changed the password stripping
JN> strategy (see also the condition above this line), because of this bug
JN> in strip_password ():

JN> It strips not only the password but everything after first PATH_SEP, so:

JN> jamesbond:007 at ci5.uk/home/secret/

JN> is after strip_password ():

JN> jamesbond at ci5.uk

Please, apply attached patch to current mc snapshot. And run src/mc

I got an output
-----------------------------------------------------
genie# ./mc
pavelsh at test.ru:pass at test.your.domain/path/to/file
pavelsh at test.ru@test.your.domain
pavelsh at test.ru:pass at test.your.domain/path/to/file
-------------------------
pavelsh:pass at test.your.domain/path/to/file
pavelsh at test.your.domain
pavelsh at test.your.domain/path/to/file
-------------------------
pavelsh at test.ru:pass at test.your.domain/
pavelsh at test.ru@test.your.domain
pavelsh at test.ru:pass at test.your.domain/
-------------------------
pavelsh at test.ru:pass at test.your.domain/path/to/file/
pavelsh at test.ru@test.your.domain
pavelsh at test.ru:pass at test.your.domain/path/to/file/
-------------------------
-----------------------------------------------------

-- 
Best regards,
 Pavel                            mailto:me at pavelsh.pp.ru
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.patch
Type: application/octet-stream
Size: 2982 bytes
Desc: not available
URL: <http://lists.midnight-commander.org/pipermail/mc-devel/attachments/20041109/8fe7d9ea/attachment.obj>


More information about the mc-devel mailing list