aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua/lua_url.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2020-03-06 14:03:20 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2020-03-09 10:46:11 +0000
commita8f11faf7f584916078d6fadb36e0c2f1984e2b0 (patch)
tree1f7b00067a856148b01c4e017442297957da9b84 /src/lua/lua_url.c
parent3e3b94276f03f520bcd1756876c1077f250127d9 (diff)
downloadrspamd-a8f11faf7f584916078d6fadb36e0c2f1984e2b0.tar.gz
rspamd-a8f11faf7f584916078d6fadb36e0c2f1984e2b0.zip
[Rework] Rework URL structure: adjust tld part
Diffstat (limited to 'src/lua/lua_url.c')
-rw-r--r--src/lua/lua_url.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lua/lua_url.c b/src/lua/lua_url.c
index cb54a694c..efd34dc6c 100644
--- a/src/lua/lua_url.c
+++ b/src/lua/lua_url.c
@@ -560,7 +560,7 @@ lua_url_get_tld (lua_State *L)
struct rspamd_lua_url *url = lua_check_url (L, 1);
if (url != NULL && url->url->tldlen > 0) {
- lua_pushlstring (L, url->url->tld, url->url->tldlen);
+ lua_pushlstring (L, rspamd_url_tld_unsafe (url->url), url->url->tldlen);
}
else {
lua_pushnil (L);
@@ -672,7 +672,7 @@ lua_url_to_table (lua_State *L)
if (u->tldlen > 0) {
lua_pushstring (L, "tld");
- lua_pushlstring (L, u->tld, u->tldlen);
+ lua_pushlstring (L, rspamd_url_tld_unsafe (u), u->tldlen);
lua_settable (L, -3);
}