Pewarta Proxy

📋 Server Request & Proxy Logs

Loading active proxy settings...
Developed by Khairul Adha (adhexa.id)
Mengambil log server...

⚙️ Pengaturan Proxy Target

Skip to content

Replace unsafe unwrap() calls in character conversion functions #7434

Open

Description

@mango766

Problem Description

In several character conversion functions in , there are unsafe calls that can cause panics when handling invalid Unicode characters.

Specifically, these functions use :

  • :
  • :
  • :
  • :

These calls can panic if:

  1. fails (invalid Unicode codepoint)
  2. or returns (empty iterator)

Expected Behavior

These functions should handle invalid inputs gracefully by returning appropriate default values instead of panicking.

Proposed Solution

Replace with safer alternatives like or proper error handling. For example:

  • For case conversion: fall back to the original character if conversion fails
  • For character property checks: return for invalid characters

This would make the code more robust and prevent unexpected crashes when processing malformed or edge-case Unicode input.

Activity

  1. youknowone commented on Mar 15, 2026

    @youknowone
    Member

    Thank you for the report. Could you share the inputs cause panics? I can handle it easier with real inputs.

  2. added a commit that references this issue on Mar 15, 2026
    aefd9ab
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions