diff options
author | Kim Alvefur <zash@zash.se> | 2017-01-06 13:07:22 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2017-01-06 13:07:22 +0100 |
commit | 1f2b72e2ca01b540054d5b245bf7d07870d42baf (patch) | |
tree | bcd241dc788a3e45a9b7e1f8a057ed1633366be5 | |
parent | 9f2191c8dc626139439ce20d54af2b6a3c55f028 (diff) | |
download | prosody-1f2b72e2ca01b540054d5b245bf7d07870d42baf.tar.gz prosody-1f2b72e2ca01b540054d5b245bf7d07870d42baf.zip |
mod_register: Strip '+' char from field names without using length
-rw-r--r-- | plugins/mod_register.lua | 2 |
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 |