umarwaqar Claude Sonnet 4.6 commited on
Commit
eaff415
·
1 Parent(s): 9bde2e2

Remove is_verified column and clean up debug logging

Browse files

- Dropped is_verified column from users table (already applied to DB)
- Removed debug logging from password hashing
- Email verification functionality completely removed

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

migrations/drop-is-verified-column.sql ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ -- Drop is_verified column from users table
2
+ -- This removes email verification functionality
3
+
4
+ ALTER TABLE users DROP COLUMN IF EXISTS is_verified;
src/services/user_service.py CHANGED
@@ -13,24 +13,14 @@ class UserService:
13
  @staticmethod
14
  def get_password_hash(password: str) -> str:
15
  """Hash a plain text password (bcrypt has 72 byte limit)"""
16
- # Debug logging
17
- import sys
18
- print(f"DEBUG: password type: {type(password)}", file=sys.stderr)
19
- print(f"DEBUG: password repr: {repr(password)}", file=sys.stderr)
20
- print(f"DEBUG: password length: {len(password) if isinstance(password, str) else 'N/A'}", file=sys.stderr)
21
-
22
  # Ensure password is a string
23
  if not isinstance(password, str):
24
  raise ValueError(f"Password must be a string, got {type(password)}")
25
 
26
  # Truncate password to 72 bytes (not characters) to avoid bcrypt error
27
  password_bytes = password.encode('utf-8')[:72]
28
- print(f"DEBUG: password_bytes length: {len(password_bytes)}", file=sys.stderr)
29
-
30
  # Decode back, ignoring any incomplete multi-byte sequences at the end
31
  truncated_password = password_bytes.decode('utf-8', errors='ignore')
32
- print(f"DEBUG: truncated_password length: {len(truncated_password)}", file=sys.stderr)
33
-
34
  return pwd_context.hash(truncated_password)
35
 
36
  @staticmethod
 
13
  @staticmethod
14
  def get_password_hash(password: str) -> str:
15
  """Hash a plain text password (bcrypt has 72 byte limit)"""
 
 
 
 
 
 
16
  # Ensure password is a string
17
  if not isinstance(password, str):
18
  raise ValueError(f"Password must be a string, got {type(password)}")
19
 
20
  # Truncate password to 72 bytes (not characters) to avoid bcrypt error
21
  password_bytes = password.encode('utf-8')[:72]
 
 
22
  # Decode back, ignoring any incomplete multi-byte sequences at the end
23
  truncated_password = password_bytes.decode('utf-8', errors='ignore')
 
 
24
  return pwd_context.hash(truncated_password)
25
 
26
  @staticmethod