You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SFTP + keypair mode doesn't work any more on stable10 #28669
{"reqId":"nGG4Y8OWrYTttMWrtzN1","level":3,"time":"2017-08-14T12:28:32+00:00","remoteAddr":"127.0.0.1","user":"admin","app":"PHP","method":"GET","url":"\/owncloudee\/ocs\/v2.php\/apps\/notifications\/api\/v1\/notifications?format=json","message":"pack(): Type H: illegal hex digit - at \/srv\/www\/htdocs\/owncloudee\/lib\/composer\/phpseclib\/phpseclib\/phpseclib\/Crypt\/RSA.php#1081"}
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.
So we have to find a new method to store the keys correct in the DB.
I've just upgraded to 10.0.3 using owncloud/server:latest docker and now getting this issue.
{"reqId":"SC9N5EqXeZFut5mX18Ow","level":3,"time":"2017-09-20T08:32:47+00:00","remoteAddr":"172.20.0.1","user":"matan.uberstein","app":"PHP","method":"PUT","url":"\/apps\/files_external\/globalstorages\/1","message":"pack(): Type H: illegal hex digit - at \/var\/www\/owncloud\/lib\/composer\/phpseclib\/phpseclib\/phpseclib\/Crypt\/RSA.php#1081"}
I commented out lines 224-226 on lib/private/Files/External/StorageConfig.php inside the running docker. It's working now 👍 It's not ideal, but would do for now. Thanks for the info! :)
Activity
PVince81 commentedon Aug 18, 2017
It looks like phpseclib has trouble parsing keys
PVince81 commentedon Aug 18, 2017
Here is an example key that fails:
PVince81 commentedon Aug 18, 2017
php7-7.1.6-1.1.x86_64
PVince81 commentedon Aug 18, 2017
Also happening with php5-5.6.31-1.1.x86_64
So it's not a PHP version thing
PVince81 commentedon Aug 18, 2017
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.
peterprochaska commentedon Aug 21, 2017
Yes, this hardening is necessary. You can inject new headers for the server and create a new request.
So we have to find a new method to store the keys correct in the DB.
PVince81 commentedon Aug 21, 2017
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.
Matan commentedon Sep 20, 2017
I've just upgraded to 10.0.3 using
owncloud/server:latestdocker and now getting this issue.PVince81 commentedon Sep 20, 2017
If you need a quickfix you can revert this commit 9b88fa6. Note that it might introduce back a little security hole.
Matan commentedon Sep 20, 2017
I think doing that with the docker is going to quite tricky. When do you think the fix will be released?
Matan commentedon Sep 20, 2017
I commented out lines 224-226 on
lib/private/Files/External/StorageConfig.phpinside the running docker. It's working now 👍 It's not ideal, but would do for now. Thanks for the info! :)PVince81 commentedon Sep 20, 2017
@Matan aiming for 10.0.4 / next month for the clean fix.
PVince81 commentedon Oct 18, 2017
fix is here: #29156
you can test it in 10.0.4beta1
Matan commentedon Dec 11, 2017
I've upgraded to 10.0.4 and I can confirm the issue is resolved. 🥇
lock commentedon Aug 2, 2019
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.