aboutsummaryrefslogtreecommitdiff
path: root/lib/pop3.c
AgeCommit message (Collapse)Author
2012-12-29pop3.c: Removed unnecessary POP3_STOP state changesSteve Holme
Removed unnecessary state changes in pop3_state_starttls_resp() following previous fix in IMAP module.
2012-12-28pop3.c: Minor code tidy upSteve Holme
Minor tidy up of comments and layout prior to next part of imap work.
2012-12-28build: make use of 76 lib/*.h renamed filesYang Tse
76 private header files renamed to use our standard naming scheme. This change affects 322 files in libcurl's source tree.
2012-12-24pop3_doing: don't call pop3_dophase_done() if already failedDaniel Stenberg
... it also clobbered the 'result' return value so that it wouldn't return the error back to the parent function properly, which broke test 809 when run with 'multi-always'.
2012-12-14setup_once.h: refactor inclusion of <unistd.h> and <sys/socket.h>Yang Tse
Inclusion of top two most included header files now done in setup_once.h
2012-12-05build: fix compilation with CURL_DISABLE_CRYPTO_AUTH flagStanislav Ivochkin
2012-06-09pop3: Post apop feature code tidy upSteve Holme
2012-06-09pop3: Added support for apop authenticationSteve Holme
2012-06-09pop3: Enhanced the extended authentication mechanism detectionSteve Holme
Enhanced the authentication type / mechanism detection in preparation for the introduction of APOP support.
2012-06-09pop3.c: Fixed length of SASL checkSteve Holme
2012-06-08sasl: Re-factored mechanism constants in preparation for APOP workSteve Holme
2012-06-05pop3: Another small code tidy upSteve Holme
Missed some comments that we identified during the SMTP tidy up earlier.
2012-06-05email: Removed duplicated header fileSteve Holme
2012-06-04sasl: Renamed Curl_sasl_decode_ntlm_type2_message()Steve Holme
For consistency with other SASL based functions renamed this function to Curl_sasl_create_ntlm_type3_message() which better describes its usage.
2012-06-04pop3: Post authentication code tidy upSteve Holme
Corrected lines longer than 78 characters. Changed POP3_AUTH_FINAL to POP3_AUTH to match SMTP code now that the AUTH command is no longer sent on its own. Introduced some comments in data sending functions. Another attempt at trying to rational code and comment style.
2012-06-04pop3: Added support for sasl digest-md5 authenticationSteve Holme
2012-06-04pop3: Changed the sasl mechanism detection from auth to capaSteve Holme
Not all SASL enabled POP3 servers support the AUTH command on its own when trying to detect the supported mechanisms. As such changed the mechanism detection to use the CAPA command instead.
2012-06-03pop3: Added support for sasl cram-md5 authenticationSteve Holme
2012-06-03pop3.c: Added conditional compilation for NTLM function callsSteve Holme
Added USE_NTLM condition compilation around the NTLM functions called from pop3_statemach_act() introduced in commit 69f7156ad96877.
2012-06-03pop3: Fixed an issue with changes introduced in commit c267c53017bcSteve Holme
Because pop3_endofresp() is called for each line of data yet is not passed the line and line length, so we have to use the data pointed to by pp->linestart_resp which contains the whole packet, the mechanisms were being detected in one call yet the function would be called for each line of data. Using curl with verbose mode enabled would show that one line of data would be received in response to the AUTH command, before the AUTH <mechanism> command was sent to the server and then the next few lines of the original AUTH command would be displayed before the response from the AUTH <mechanism> command. This would then cause problems when parsing the CRAM-MD5 challenge data as extra data was contained in the buffer. Changed the parsing so that each line is checked for the mechanisms and the function returns FALSE until the whole of the AUTH response has been processed.
2012-06-02pop3.c:Corrected typo in commit 69ba0da8272dSteve Holme
2012-06-02pop3: Fixed the issue of having to supply the user name for all requestsSteve Holme
Previously it wasn't possible to connect to POP3 and not specify the user name as a CURLE_ACCESS_DENIED error would be returned. This error occurred because USER would be sent to the server with a blank user name if no mailbox user was specified as the server would reply with -ERR. This wasn't a problem prior to the 7.26.0 release but with the introduction of custom commands the user and/or application developer might want to issue a CAPA command without having to log in as a specific mailbox user. Additionally this fix won't send the newly introduced AUTH command if no user name is specified.
2012-06-02pop3.c: Small code tidy upSteve Holme
Corrected lines exceeding 78 characters. Repositioned some comments and added extra clarity.
2012-06-02pop3: Added support for sasl ntlm authenticationSteve Holme
2012-06-01pop3: Added support for sasl login authenticationSteve Holme
2012-05-31pop3: Added support for sasl plain text authenticationSteve Holme
2012-05-28pop3: Introduced the continue response in pop3_endofresp()Steve Holme
2012-05-28pop3: Changed response code from O and E to + and -Steve Holme
The POP3 protocol doesn't really have the concept of error codes and uses +, +OK and -ERR in response to commands to indicate continue, success and error. The AUTH command is one of those commands that requires multiple pieces of data to be sent to the server where the server will respond with + as part of the handshaking. This meant changing the values before continuing with the next stage of adding authentication support.
2012-05-28pop3: Small code tidy up following authentication work so farSteve Holme
Changed the order of the state machine to match the order of actual events. Reworked some comments and function parameter positioning that I missed the other day.
2012-05-27pop3: remove variable-not-used warningsDaniel Stenberg
2012-05-27pop3: Added support for SASL based authentication mechanism detectionSteve Holme
Added support for detecting the supported SASL authentication mechanisms via the AUTH command. There are two ways of detecting them, either by using the AUTH command, that will return -ERR if not supported or by using the CAPA command which will return SASL and the list of mechanisms if supported, not include SASL if SASL authentication is not supported or -ERR if the CAPA command is not supported. As such it seems simpler to use the AUTH command and fallback to normal clear text authentication if the the command is not supported. Additionally updated the test cases to return -ERR when the AUTH command is encountered. Additional test cases will be added when support for the individual authentication mechanisms is added.
2012-05-27pop3: remove trailing whitespaceDaniel Stenberg
2012-05-27pop3: Code tidy up before the introduction of authentication codeSteve Holme
Moved EOB definition into header file. Switched the logic around in pop3_endofresp() to allow for the introduction of auth-mechanism detection. Repositioned second and third function variables where they will fit within the 78 character line limit. Tidied up some comments.
2012-04-02pop3: Reworked the command sending and handlingSteve Holme
Reworked the command sending from two specific LIST and RETR command functions into a single command based function as well as the two associated response handlers into a generic command handler.
2012-03-31pop3: Added support for additional pop3 commandsSteve Holme
This feature allows the user to specify and use additional POP3 commands such as UIDL and DELE via libcurl's CURLOPT_CUSTOMREQUEST or curl's -X command line option.
2012-03-25pop3.c: Corrected problem with state() introduced in 01690ed2bce5Steve Holme
2012-03-25pop.c: Small code tidy upSteve Holme
2012-03-25pop3: Removed the need for the single message LIST command handlerSteve Holme
Simplified the code to remove the need for a separate "LIST <msg id>" command handler and state machine and instead use the LIST command handler for both operations.
2012-03-24pop3.c: Code policing and tidy upSteve Holme
Corrected character and line spacing and re-ordered list and retr functions based on the order of their state machines.
2012-03-24email: Moved server greeting responses into separate functionsSteve Holme
Moved the server greeting response handling code from the statemach_act functions to separate response functions. This makes the code simpler to follow and provides consistency with the other responses that are handled here.
2012-03-24pop3.c: Fixed body data being written when CURLOPT_NOBODY is specifiedSteve Holme
Body data would be forwarded to the client application in both the RETR and LIST commands even if CURLOPT_NOBODY was specified.
2012-03-09includes: remove inclusion of unused file http_proxy.hDaniel Stenberg
2012-03-08CONNECT: made generically not per-protocolDaniel Stenberg
Curl_protocol_connect() now does the tunneling through the HTTP proxy if requested instead of letting each protocol specific connection function do it.
2012-02-19pop3.c: Fixed drop of final CRLF in EOB checkingSteve Holme
Curl_pop3_write() would drop the final CRLF of a message as it was considered part of the EOB as opposed to part of the message. Whilst the EOB sequence needs to be searched for by the function only the final 3 characters should be removed as per RFC-1939 section 3. Reported by: Rich Gray Bug: http://curl.haxx.se/mail/lib-2012-02/0051.html
2012-01-24URL sanitize: reject URLs containing bad dataDaniel Stenberg
Protocols (IMAP, POP3 and SMTP) that use the path part of a URL in a decoded manner now use the new Curl_urldecode() function to reject URLs with embedded control codes (anything that is or decodes to a byte value less than 32). URLs containing such codes could easily otherwise be used to do harm and allow users to do unintended actions with otherwise innocent tools and applications. Like for example using a URL like pop3://pop3.example.com/1%0d%0aDELE%201 when the app wants a URL to get a mail and instead this would delete one. This flaw is considered a security vulnerability: CVE-2012-0036 Security advisory at: http://curl.haxx.se/docs/adv_20120124.html Reported by: Dan Fandrich
2012-01-04Fixed use of CURLUSESSL_TRY for POP3 and IMAP based connections.Steve Holme
Fixed a problem in POP3 and IMAP where a connection would fail when CURLUSESSL_TRY was specified for a server that didn't support SSL/TLS connections rather than continuing.
2012-01-04Fixed incorrect error code being returned in STARTTLSSteve Holme
The STARTTLS response code in SMTP, POP3 and IMAP would return CURLE_LOGIN_DENIED rather than CURLE_USE_SSL_FAILED when SSL/TLS was not available on the server. Reported by: Gokhan Sengun Bug: http://curl.haxx.se/mail/lib-2012-01/0018.html
2011-12-13pop3.c: fix compiler warning variable may be used uninitializedYang Tse
2011-12-01POP3: fixed escaped dot not being striped outSteve Holme
Changed the eob detection to work across the whole of the buffer so that lines that begin with a dot (which the server will have escaped) are passed to the client application correctly.
2011-11-29pop3.c: fix compiler warningYang Tse