aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-01-06 13:07:22 +0100
committerKim Alvefur <zash@zash.se>2017-01-06 13:07:22 +0100
commit56f3c13d17b6e98923bc914cc51ed95527ea0b55 (patch)
treebcd241dc788a3e45a9b7e1f8a057ed1633366be5 /plugins
parent43cc8f2d9de3fbe5fca99ed7980b921e06c683a4 (diff)
downloadprosody-56f3c13d17b6e98923bc914cc51ed95527ea0b55.tar.gz
prosody-56f3c13d17b6e98923bc914cc51ed95527ea0b55.zip
mod_register: Strip '+' char from field names without using length
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_register.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_register.lua b/plugins/mod_register.lua
index f89efe20..7a57d65b 100644
--- a/plugins/mod_register.lua
+++ b/plugins/mod_register.lua
@@ -64,7 +64,7 @@ for _, field in ipairs(additional_fields) do
registration_form[#registration_form + 1] = field;
else
if field:match("%+$") then
- field = field:sub(1, #field - 1);
+ field = field:sub(1, -2);
field_map[field].required = true;
end