Browse Source

[Fix] Fix creating of URLs from LUA

tags/1.3.0
Vsevolod Stakhov 8 years ago
parent
commit
3db95ac8fe
1 changed files with 5 additions and 1 deletions
  1. 5
    1
      src/lua/lua_url.c

+ 5
- 1
src/lua/lua_url.c View File

@@ -487,10 +487,14 @@ lua_url_create (lua_State *L)
text = luaL_checklstring (L, 2, &length);

if (text != NULL) {
lua_newtable (L);
rspamd_url_find_single (pool, text, length, FALSE,
lua_url_single_inserter, L);

if (lua_type (L, -1) != LUA_TUSERDATA) {
/* URL is actually not found */
lua_pushnil (L);
}

}
else {
lua_pushnil (L);

Loading…
Cancel
Save