From eb28cc845c2e1063e6b1111519164e12ce2bed4e Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 1 Jul 2022 21:14:52 +0100 Subject: [Minor] Implement binary string checks Issue: #4204 --- src/lua/lua_text.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/lua/lua_text.c') diff --git a/src/lua/lua_text.c b/src/lua/lua_text.c index 19317bf59..04a416942 100644 --- a/src/lua/lua_text.c +++ b/src/lua/lua_text.c @@ -348,6 +348,23 @@ lua_new_text (lua_State *L, const gchar *start, gsize len, gboolean own) return t; } +bool +lua_is_text_binary(struct rspamd_lua_text *t) +{ + if (t == NULL || t->len == 0) { + return false; + } + + if (rspamd_str_has_8bit(t->start, t->len)) { + if (rspamd_fast_utf8_validate(t->start, t->len) == 0) { + return true; + } + return false; + } + + return true; +} + static gint lua_text_fromstring (lua_State *L) -- cgit v1.2.3 able Mirror of redmine code source: https://github.com/redmine/redminewww-data
summaryrefslogtreecommitdiffstats
path: root/app/views/groups/destroy_membership.js.erb
blob: 30ab3b081813c358b9ae48782745a076dcd333dd (plain)
1
$('#tab-content-memberships').html('<%= escape_javascript(render :partial => 'groups/memberships') %>');