Skip to content

feat: validate profanity on user profile fields and change chat_banne… - #240

Merged
trtajim merged 1 commit into
mainfrom
feat/profanity-filter-and-datetime-fix
Aug 30, 2026
Merged

feat: validate profanity on user profile fields and change chat_banne…#240
trtajim merged 1 commit into
mainfrom
feat/profanity-filter-and-datetime-fix

Conversation

@trtajim

@trtajim trtajim commented Aug 30, 2026

Copy link
Copy Markdown
Member

…d_until to datetime

Summary by CodeRabbit

  • New Features

    • Added profanity screening to Google onboarding and profile fields.
    • Automatically replaces profane Google profile names with “Student.”
    • Added length limits for profile descriptions and titles.
    • Improved precision for chat-ban expiration times.
  • Bug Fixes

    • Prevents disallowed text from being submitted through profile and user forms.
  • Tests

    • Added coverage verifying profanity validation across profile fields.

@coderabbitai

coderabbitai Bot commented Aug 30, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: fc70b705-efee-45c7-b113-61b99cf8f408

📥 Commits

Reviewing files that changed from the base of the PR and between a929b9a and 0b866f7.

📒 Files selected for processing (7)
  • app/Http/Controllers/AuthController.php
  • app/Http/Requests/Profile/UpdateProfileRequest.php
  • app/Http/Requests/User/StoreUserRequest.php
  • app/Http/Requests/User/UpdateUserRequest.php
  • app/Rules/CleanText.php
  • database/migrations/2026_08_30_172418_change_chat_banned_until_to_datetime_in_users_table.php
  • tests/Feature/UserProfileTest.php

📝 Walkthrough

Walkthrough

The PR adds profanity validation to authentication and profile fields, sanitizes profane Google names during onboarding, adds feature coverage for profile validation, and changes the nullable chat_banned_until column from timestamp to dateTime.

Changes

Text validation

Layer / File(s) Summary
CleanText rule and authentication validation
app/Rules/CleanText.php, app/Http/Controllers/AuthController.php
Adds CleanText to reject profane strings. Authentication applies it to onboarding fields and replaces profane Google names with Student.
Profile validation and coverage
app/Http/Requests/Profile/UpdateProfileRequest.php, app/Http/Requests/User/*Request.php, tests/Feature/UserProfileTest.php
Applies CleanText to profile fields, adds length limits, and tests banned-word errors for profile updates.

Ban timestamp schema

Layer / File(s) Summary
Ban timestamp migration
database/migrations/2026_08_30_172418_change_chat_banned_until_to_datetime_in_users_table.php
Changes nullable users.chat_banned_until from timestamp to dateTime, with a rollback to timestamp.

Estimated code review effort: 3 (Moderate) | ~20 minutes

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/profanity-filter-and-datetime-fix

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@trtajim
trtajim merged commit c2d37c1 into main Aug 30, 2026
5 of 6 checks passed
@trtajim
trtajim deleted the feat/profanity-filter-and-datetime-fix branch August 30, 2026 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant