From bd35592ac7f26c6c21553990b2d34b87fe7d1b15 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sun, 1 Dec 2013 19:00:45 +0000 Subject: [PATCH] Fix restfull mode when controller has no password. --- src/controller.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/controller.c b/src/controller.c index b5aba9b90..d59cc2972 100644 --- a/src/controller.c +++ b/src/controller.c @@ -1226,7 +1226,9 @@ process_header (f_str_t *line, struct controller_session *session) else if (*headern == 'p' || *headern == 'P') { /* Password header */ if (g_ascii_strcasecmp (headern, "password") == 0) { - if (line->len == strlen (ctx->password) && memcmp (line->begin, ctx->password, line->len) == 0) { + if (ctx->password == NULL || + (line->len == strlen (ctx->password) + && memcmp (line->begin, ctx->password, line->len) == 0)) { session->authorized = TRUE; } else { -- 2.39.5