Croway commented on PR #30167:
URL: https://github.com/apache/camel/pull/30167#issuecomment-6915165340

   @davsclaus
   
   1. Done in 2dd8b6f: `reason()` joins the lines of the message with a space, 
so the WARN stays on one line. One correction: since commons-net 3.12.0, 
`getReplyString()` joins the reply lines with CRLF and adds none at the end 
(`String.join(NETASCII_EOL, _replyLines)`), so with 3.13.0 a one-line `530 
Login incorrect.` gives no line break. A reply of several lines (`530-...` then 
`530 ...`) does, and that is what the new test uses. I used `lines()` instead 
of a regex with `\s*` on both sides of `[\r\n]+`, which can backtrack.
   2. Done, with one more change: that WARN could never be logged. The catch 
block sets `loggedIn = false`, so `loggedIn && !autoCreatedDone` after it is 
always false, and a starting directory that could not be created was logged as 
`Cannot connect/login to: ...`. `prePollCheck` now records whether it had 
connected before the failure, and logs `Cannot auto-create starting directory 
at: ... due to: <reason>. Will skip this poll.`. The upgrade guide entry says 
so. `SmbConsumer` has the same unreachable WARN; I left it out of this PR.
   3. Confirmed with the embedded server set to 
`auth-methods=password,keyboard-interactive`: the right password is checked 
once, and then the login ends with `Auth fail for user 'admin': the server did 
not accept the password`. The doc section now says that such a server rejects 
the login, with that message, even when the password is right.
   4. Filed [CAMEL-27031](https://issues.apache.org/jira/browse/CAMEL-27031). 
On main, with a wrong password, mina-sftp sends it 3 times per poll (one per 
session, 3 sessions), and 6 when the server offers both `password` and 
`keyboard-interactive`.
   
   Tests: `RemoteFileConsumerSkipPollWarnTest` (new, mocked operations): the 
reply of two lines and the auto-create failure (ftp and sftp). All 3 fail 
before the change and pass after. The WARN capture of 
`SftpConsumerWrongPasswordIT` moved to `RemoteFileConsumerWarnCapture`, which 
both tests use. `RemoteFileConsumerSendNoopTest`, `SftpConsumerWrongPasswordIT` 
and the ftp/sftp auto-create and bad-login ITs pass.
   
   _Claude Code on behalf of Federico Mariani_
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to