Software /
code /
prosody
Changeset
7814:2120d71b0d56
mod_register: Strip '+' char from field names without using length
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 06 Jan 2017 13:07:22 +0100 |
parents | 7813:56b0ae8cbb02 |
children | 7815:f8d25a2e80ea |
files | plugins/mod_register.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_register.lua Fri Jan 06 11:10:24 2017 +0100 +++ b/plugins/mod_register.lua Fri Jan 06 13:07:22 2017 +0100 @@ -64,7 +64,7 @@ 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