Merge pull request #4037 from brvphoenix/hd-idle
[oweals/luci.git] / protocols / luci-proto-wireguard / htdocs / luci-static / resources / protocol / wireguard.js
index 49f61c782a1459a2127f16202b0e905ee7eeb233..e88c07c339ba532f4f319e600fbc9f31d92def6a 100644 (file)
@@ -10,6 +10,9 @@ function validateBase64(section_id, value) {
        if (value.length != 44 || !value.match(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/))
                return _('Invalid Base64 key string');
 
+       if (value[43] != "=" )
+               return _('Invalid Base64 key string');
+
        return true;
 }