lldap-cli 1.2.1 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +7 -2
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -2376,7 +2376,12 @@ class LldapClient {
|
|
|
2376
2376
|
}
|
|
2377
2377
|
validateEmail(email) {
|
|
2378
2378
|
this.validateInputLength(email, "email", LldapClient.MAX_EMAIL_LENGTH);
|
|
2379
|
-
|
|
2379
|
+
const atIndex = email.indexOf("@");
|
|
2380
|
+
if (atIndex < 1 || atIndex === email.length - 1) {
|
|
2381
|
+
throw new UsageError("Invalid email format");
|
|
2382
|
+
}
|
|
2383
|
+
const domainPart = email.slice(atIndex + 1);
|
|
2384
|
+
if (/\s/.test(email) || !domainPart.includes(".") || domainPart.startsWith(".") || domainPart.endsWith(".")) {
|
|
2380
2385
|
throw new UsageError("Invalid email format");
|
|
2381
2386
|
}
|
|
2382
2387
|
}
|
|
@@ -3188,7 +3193,7 @@ var ExitCode2 = {
|
|
|
3188
3193
|
// package.json
|
|
3189
3194
|
var package_default = {
|
|
3190
3195
|
name: "lldap-cli",
|
|
3191
|
-
version: "1.2.
|
|
3196
|
+
version: "1.2.2",
|
|
3192
3197
|
description: "CLI tool for managing LLDAP (Lightweight LDAP) users, groups, and schema",
|
|
3193
3198
|
type: "module",
|
|
3194
3199
|
bin: {
|