@prunellejs/auth 0.7.4 → 0.7.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prunellejs/auth",
3
- "version": "0.7.4",
3
+ "version": "0.7.7",
4
4
  "description": "Zero-dependency Bun-native auth plugin for Prunelle (Argon2id, hashed sessions, SQLite, magic links, OAuth2 PKCE, TOTP 2FA, Passkeys, Organizations)",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -24,6 +24,6 @@
24
24
  "directory": "packages/plugin-auth"
25
25
  },
26
26
  "peerDependencies": {
27
- "prunelle": "^0.7.4"
27
+ "prunelle": "^0.7.7"
28
28
  }
29
29
  }
package/src/http.ts CHANGED
@@ -125,8 +125,8 @@ export function createAuthRouteRegistrar(
125
125
  }
126
126
  }
127
127
 
128
- // Control characters (C0/DEL), whitespace, and the characters that split or wrap an address list.
129
- const EMAIL_FORBIDDEN_RE = /[\u0000-\u001F\u007F\s,;<>]/
128
+ // Control characters (C0, DEL, C1 such as U+0085), whitespace, and the characters that split or wrap an address list.
129
+ const EMAIL_FORBIDDEN_RE = /[\u0000-\u001F\u007F-\u009F\s,;<>]/
130
130
 
131
131
  export function isValidEmail(email: string): boolean {
132
132
  const e = email.trim()
package/src/org-routes.ts CHANGED
@@ -153,7 +153,7 @@ export function registerOrgRoutes<TUser extends AuthUser = AuthUser>(deps: OrgRo
153
153
 
154
154
  const email = normalizeEmail(body.email ?? '')
155
155
  if (!isValidEmail(email))
156
- return fail(ctx, 400, 'prunelle: please enter a valid email address')
156
+ return fail(ctx, 400, 'Please enter a valid email address')
157
157
 
158
158
  const linkOrigin = mailedLinkOrigin(ctx.url)
159
159
  if (hasMailTransport && linkOrigin === undefined) {