-
Notifications
You must be signed in to change notification settings - Fork 3
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
No error message despite incorrect settings #21
Comments
Hi @kirchnerf , thanks for reporting the issue. I tested this on my system again. With my configuration (no proxy) I do get an error message when I put in wrong credentials: In fact, the plugin adds the original error message ("Authentication failure") provided by the SFTP server to an internal error massage, provided that curl acutally reported an error. If curl doesn't report an error there is unfortunately nothing the plugin can do. The only reason I can image why curl is not repoerting an error in case wrong credetials are given is a proxy server inbetween the connection that does not pass on the error reported by the DNB SFTP server. Do you use a proxy server in your configuration? |
We don't use a proxy. But I did some more tests and found out that I get an error on Windows if the credentials are wrong. On openSuse and Suse Linux Enterprise, I don't get an error. On all systems I used PHP 8.0.30. I will now also try it with Ubuntu. |
Thanks for digging into this.
It may be a curl or sftp configuration issue. Or the curl/sftp bineries have been compiled with different options on the different platforms. We use Debian. |
On Ubuntu 22.04.4 (PHP 8.1) the behavior is the same as on openSuse and SLES. php-curl does not return an error if the credentials are wrong. |
Could you do a curl --version on one of these systems? On my Debian 10 it gives: $ curl --version
curl 7.64.0 (x86_64-pc-linux-gnu) libcurl/7.64.0 OpenSSL/1.1.1n zlib/1.2.11 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.5) libssh2/1.8.0 nghttp2/1.36.0 librtmp/2.3
Release-Date: 2019-02-06
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP HTTP2 UnixSockets HTTPS-proxy PSL |
OpenSuse 15.5:
Suse Linux Enterprise 15.5:
Ubuntu 22.04.4:
|
Although the access data (user name, password and subfolder ID) are incorrect, the plugin reports a successful upload of the data. Curl returns the status code 0 and the error array is empty. This case is not covered by the error detection in the depositXML() method in DNBExportPlugin.inc.php.
This behavior has already been described in #11
OJS version: 3.3.0.16
DNB plugin version: 1.5.0
PHP 8.0.30
The text was updated successfully, but these errors were encountered: