/* Exclude RSPAMD_URL_FLAG_CONTENT to preserve backward compatibility */
if (!lua_url_cbdata_fill (L, 2, &cb, default_protocols_mask,
- (~RSPAMD_URL_FLAG_CONTENT), max_urls)) {
+ ~(RSPAMD_URL_FLAG_CONTENT|RSPAMD_URL_FLAG_IMAGE), max_urls)) {
return luaL_error (L, "invalid arguments");
}
if (task) {
if (task->message) {
if (!lua_url_cbdata_fill (L, 2, &cb, PROTOCOL_MAILTO,
- (~RSPAMD_URL_FLAG_CONTENT), max_urls)) {
+ ~(RSPAMD_URL_FLAG_CONTENT|RSPAMD_URL_FLAG_IMAGE), max_urls)) {
return luaL_error (L, "invalid arguments");
}
flags_mask &= ~RSPAMD_URL_FLAG_IMAGE;
}
}
+ else {
+ flags_mask &= ~RSPAMD_URL_FLAG_IMAGE;
+ }
lua_pop (L, 1);
lua_getfield (L, pos, "content");
flags_mask &= ~RSPAMD_URL_FLAG_CONTENT;
}
}
+ else {
+ flags_mask &= ~RSPAMD_URL_FLAG_CONTENT;
+ }
lua_pop (L, 1);
lua_getfield (L, pos, "max_urls");