mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-11-29 01:03:57 +03:00
options: Do not attempt to expand percents in PKCS#11 URIs
With the old token parser, the data was simply broken on the = sign even if the uri was in quotes and ignored. Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
This commit is contained in:
@@ -1472,6 +1472,13 @@ int ssh_options_apply(ssh_session session) {
|
|||||||
it != NULL;
|
it != NULL;
|
||||||
it = it->next) {
|
it = it->next) {
|
||||||
char *id = (char *) it->data;
|
char *id = (char *) it->data;
|
||||||
|
if (strncmp(id, "pkcs11:", 6) == 0) {
|
||||||
|
/* PKCS#11 URIs are using percent-encoding so we can not mix
|
||||||
|
* it with ssh expansion of ssh escape characters.
|
||||||
|
* Skip these identities now, before we will have PKCS#11 support
|
||||||
|
*/
|
||||||
|
continue;
|
||||||
|
}
|
||||||
tmp = ssh_path_expand_escape(session, id);
|
tmp = ssh_path_expand_escape(session, id);
|
||||||
if (tmp == NULL) {
|
if (tmp == NULL) {
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
Reference in New Issue
Block a user