curl/tests/data/test480
Daniel Stenberg e9b9bbac22
netrc: address several netrc parser flaws
- make sure that a match that returns a username also returns a
  password, that should be blank if no password is found

- fix handling of multiple logins for same host where the password/login
  order might be reversed.

- reject credentials provided in the .netrc if they contain ASCII control
  codes - if the used protocol does not support such (like HTTP and WS do)

Reported-by: Harry Sintonen

Add test 478, 479 and 480 to verify. Updated unit 1304.

Closes #15586
2024-11-17 11:33:56 +01:00

39 lines
495 B
Plaintext

<testcase>
<info>
<keywords>
netrc
pop3
</keywords>
</info>
#
# Server-side
<reply>
</reply>
#
# Client-side
<client>
<server>
pop3
</server>
<name>
Reject .netrc with credentials using CRLF for POP3
</name>
<command>
--netrc --netrc-file %LOGDIR/netrc%TESTNUMBER pop3://%HOSTIP:%POP3PORT/%TESTNUMBER
</command>
<file name="%LOGDIR/netrc%TESTNUMBER" >
machine %HOSTIP
login alice
password "password\r\ncommand"
</file>
</client>
<verify>
<errorcode>
26
</errorcode>
</verify>
</testcase>