Skip to content

nsc-events-fullstack_32_173-remove-console-logging-frontend - #177

Closed
NahomAlemu wants to merge 1 commit into
mainfrom
bug-173-remove-console-logging-frontend
Closed

nsc-events-fullstack_32_173-remove-console-logging-frontend#177
NahomAlemu wants to merge 1 commit into
mainfrom
bug-173-remove-console-logging-frontend

Conversation

@NahomAlemu

Copy link
Copy Markdown
Contributor

Summary & Changes 📃

  • Resolves: Security: Remove console logging of sensitive information in frontend #173
  • Summary: Remove console logging statements from frontend codebase that could expose sensitive
    information
    • 🔨 Fixes security vulnerability where API URLs, tokens, JWT data, and user information were being
      logged to browser console
    • 👀 Console remains clean in production with no sensitive data exposure; error handling preserved
      through UI feedback (snackbar messages, state updates)
    • 🗨️ Removed 40+ console.log/console.error statements across 21 files; test mock files intentionally
      left unchanged
  • Changes:
    • ✅ Removed API URL logging from auth components (sign-in, sign-up, change-password)
    • ✅ Removed JWT token and user data logging from useAuth, userUtils
    • ✅ Removed event data debug logging from useEventForm, useEditForm hooks
    • ✅ Removed navigation/state debugging from event-detail page
    • ✅ Removed error console.error statements (replaced with silent handling or UI feedback)
    • 🛠️ No breaking changes - all error handling preserved via snackbar/state
    • 📝 Files modified: LoginWindow, CoverPhotoDialog, AttendDialog, ArchiveDialog, sign-in/page,
      signupApi, useEventForm, useEditForm, useAuth, userUtils, event-detail/page, profile/page, and 9 others

How to Test 🧪

  1. Steps to Reproduce:
    - Step 1: Run npm run build in nsc-events-nextjs - should compile successfully
    - Step 2: Run npm run lint - should pass with no errors
    - Step 3: Open browser DevTools console, navigate through the app (login, view events, attend events,
    edit events)
  2. Expected Behavior: Console should be clean with no API URLs, tokens, or sensitive data logged
  3. Actual Behavior (if bug): Previously, console showed API endpoints, JWT tokens, and debug data

Checklist ✅

  • I have tested this PR locally and it works as expected.
  • This PR resolves an issue (Resolves #173).
  • Reviewers, assignees(self), tags, and labels are correctly assigned.
  • Squash commits and enable auto-merge if approved.

@NahomAlemu NahomAlemu self-assigned this Mar 7, 2026
@NahomAlemu NahomAlemu added the security Vulnerability patches, encryption, or access control label Mar 7, 2026
@github-actions

github-actions Bot commented Mar 7, 2026

Copy link
Copy Markdown

✅ Full E2E Test Results

Running full test suite (critical files changed)

Status Count
✅ Passed 47
❌ Failed 0
📊 Total 47

View detailed report

@TVW96 TVW96 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple warnings but no visible console logs.

Image Image Image

@NahomAlemu

Copy link
Copy Markdown
Contributor Author

Since my practicum work has ended, I'm closing this PR to keep the repository tidy. I won't be able to address future feedback, but feel free to use this branch as a reference if the feature is needed later

@NahomAlemu NahomAlemu closed this May 7, 2026
@NahomAlemu
NahomAlemu deleted the bug-173-remove-console-logging-frontend branch May 7, 2026 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

security Vulnerability patches, encryption, or access control

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Security: Remove console logging of sensitive information in frontend

2 participants