-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SFTP + keypair mode doesn't work any more on stable10 #28669
Comments
It looks like phpseclib has trouble parsing keys |
Here is an example key that fails:
|
php7-7.1.6-1.1.x86_64 |
Also happening with php5-5.6.31-1.1.x86_64 So it's not a PHP version thing |
Okay, I bisected this and the problem appeared with this commit 9b88fa6 which seems to strip "\n" and "\r" from the config options. Not sure if this one is really needed, possibly a hardening. @Peter-Prochaska I think the private and public keys are stored with newline in the DB, maybe we should convert it to a different format before storing, like base64 ? If we do, we'll also need to convert the old keys to the new format. |
Yes, this hardening is necessary. You can inject new headers for the server and create a new request. |
Ok, so here's the plan:
Not sure yet about the migration. Easiest would be to switch to a new setting name so we can detect whether the old one is here or new one. |
I've just upgraded to 10.0.3 using
|
If you need a quickfix you can revert this commit 9b88fa6. Note that it might introduce back a little security hole. |
I think doing that with the docker is going to quite tricky. When do you think the fix will be released? |
I commented out lines 224-226 on |
@Matan aiming for 10.0.4 / next month for the clean fix. |
fix is here: #29156 you can test it in 10.0.4beta1 |
I've upgraded to 10.0.4 and I can confirm the issue is resolved. 🥇 |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Steps
Expected
Green light
Actual
Red.
Version
stable10 1f0a3b0
Log is full of:
The text was updated successfully, but these errors were encountered: