]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
Add extra check of string passed to lua.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 10 Sep 2014 13:18:05 +0000 (14:18 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 10 Sep 2014 13:18:05 +0000 (14:18 +0100)
src/lua/lua_task.c

index 05c4730e4bf4faf8888c7e89d59b9ee3dad10cde..98bbef8db304371c32530401a13ee2fe1ba940b6 100644 (file)
@@ -2081,7 +2081,7 @@ lua_url_get_user (lua_State *L)
 {
        struct uri *url = lua_check_url (L);
 
-       if (url != NULL) {
+       if (url != NULL && url->user != NULL) {
                lua_pushlstring (L, url->user, url->userlen);
        }
        else {