also remove \r from user name

Tue, 23 Jul 2024 14:40:20 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Tue, 23 Jul 2024 14:40:20 +0200
changeset 825
ca568c209dfd
parent 824
76ca3dac6506
child 826
b6e9fd3f1951

also remove \r from user name

dav/config.c file | annotate | diff | comparison | revisions
--- a/dav/config.c	Tue Jul 23 14:29:33 2024 +0200
+++ b/dav/config.c	Tue Jul 23 14:40:20 2024 +0200
@@ -607,6 +607,9 @@
     if(user.length > 0 && user.ptr[user.length-1] == '\n') {
         user.length--;
     }
+    if(user.length > 0 && user.ptr[user.length-1] == '\r') {
+        user.length--;
+    }
     
     char *password = util_password_input("Password: ");
     if(!password || strlen(password) == 0) {

mercurial