Skip to content

Conversation

@annacia
Copy link

@annacia annacia commented Oct 17, 2025

URI Sanitization Enhancements

This pull request extends the URI sanitization functionality to include support for masking email addresses and phone numbers, ensuring that sensitive identifiers are properly hidden in sanitized URIs.

  • Added regex patterns to detect and replace email addresses and international phone numbers with the placeholders <EMAIL> and <PHONE-NUMBER>.
  • These enhancements build on the existing sanitization logic without altering existing behaviors for other types of identifiers.

Testing Improvements

Two new test cases were introduced to validate the new masking logic:

  • testSanitizePhoneNumber — verifies that phone numbers within URIs are correctly identified and replaced with the <PHONE-NUMBER> placeholder across multiple URI formats.
  • testSanitizeEmail — ensures that email addresses in URIs are properly sanitized and replaced with the <EMAIL> placeholder, including cases with multiple occurrences.

These additions help maintain consistency and privacy across all URI sanitization scenarios.

leocavalcante and others added 30 commits July 11, 2023 21:50
* refactor: Avoid high cardinality

* refactor: Object not being used

* refactor: Restore exception class labeling
* add new patterns and replacements strings

* add new tests

* fix change patterns and replacements order
* fix patterns, shortening patterns and implement case-insensitive

* add vscode and jetbrains ide folders into .gitignore
Update HttpClientMetricAspect.php
* feat identified connect exception on http promise rejection

* use interface instead exception

* abstract catch of exception

* add specific message on errors
* [3.1]Bumps dependencies (#5796)



Co-authored-by: 李铭昕 <715557344@qq.com>

* Upgrade hyperf packages to version `~3.1.0` (#5801)

* Bumps `phpunit` to `10.x` (#5802)


Co-authored-by: 李铭昕 <715557344@qq.com>

* Remove redundant `setAccessible` methods (#5811)

* Remove deprecated codes (#5812)

* Removed the deprecated code for metric. (#5847)

* Use `StrCache` instead of `Str` in special cases. (#5866)

* [feat] Support buffer mechanism in standalone process of metric (#6030)



Co-authored-by: 李铭昕 <715557344@qq.com>

* Fix the bug that cannot stop the command from terminating gracefully (#6090)

* Upgrade actions/checkout to v4 (#6159)

* Adds `metric.enable_command_metric` switch (#6272)

* Changed the `branch-alias` of all components to `3.1-dev`. (#6320)

* update dependencies

* Remove unused import

---------

Co-authored-by: Deeka Wong <huangdijia@gmail.com>
Co-authored-by: 李铭昕 <715557344@qq.com>
Co-authored-by: yansongda <yansongda@users.noreply.github.com>
Co-authored-by: Albert Chen <albert.cht@gmail.com>
* Add: AndroidID Regex

* Add: AndroidID Regex
Add ignore_path configuration
* WIP

* Increment test

* Fix testes

* Fix testes

* Fix testes

* WIP

* Delete .moonlight.yaml

* Delete Dockerfile

* Delete Makefile

* Delete docker-compose.yml

---------

Co-authored-by: Leo Cavalcante <lc@leocavalcante.com>
…eries SQL (#25)

* Incluir padrão de sanitização de LIMIT e OFFSET em SqlSanitizer
…am valores maiúsculos e minúsculos (#26)

* Fix para tratar OFFSET e LIMIT maiúsculos e minúsculos
* [3.1]Bumps dependencies (#5796)



Co-authored-by: 李铭昕 <715557344@qq.com>

* Upgrade hyperf packages to version `~3.1.0` (#5801)

* Bumps `phpunit` to `10.x` (#5802)


Co-authored-by: 李铭昕 <715557344@qq.com>

* Remove redundant `setAccessible` methods (#5811)

* Remove deprecated codes (#5812)

* Removed the deprecated code for metric. (#5847)

* Use `StrCache` instead of `Str` in special cases. (#5866)

* [feat] Support buffer mechanism in standalone process of metric (#6030)



Co-authored-by: 李铭昕 <715557344@qq.com>

* Fix the bug that cannot stop the command from terminating gracefully (#6090)

* Upgrade actions/checkout to v4 (#6159)

* Adds `metric.enable_command_metric` switch (#6272)

* Changed the `branch-alias` of all components to `3.1-dev`. (#6320)

* Update grafana.json (#6531)

* Added comment (#6607)

* Format code by the latest `cs-fixer`. (#6617)

* Added composer.json normalize support (#6887)

* Format code (#6994)

* Improve actions (#7088)

* update github actions for all components. (#7090)

---------

Co-authored-by: Deeka Wong <huangdijia@gmail.com>
Co-authored-by: 李铭昕 <715557344@qq.com>
Co-authored-by: yansongda <yansongda@users.noreply.github.com>
Co-authored-by: Albert Chen <albert.cht@gmail.com>
Co-authored-by: 宣言就是Siam <59419979@qq.com>
lucashcaraujo23 and others added 8 commits August 22, 2025 10:17
feat: adiciona sanitização do parâmetro external-id na URI
chore: Include BILL-UUID pattern in URI sanitization
upkeep: Altera sanitização do UUID para permitir prefixos dinâmicos
* feat: handle HttpException separately in MetricMiddleware

Added a catch block for HttpException in MetricMiddleware to treat them as valid HTTP responses, updating request_status label accordingly before ending the timer. This prevents HttpExceptions from being counted as internal errors.

* chore: remove close-pull-request and release workflows

Deleted GitHub Actions workflows for closing pull requests and handling releases. These workflows are no longer needed or have been moved.
…atos de ID ECOSYSTEM (#32)

upkeep: Atualiza sanitização para suportar IDs prefixados e novos formatos de ID ECOSYSTEM
#33)

upkeep: Atualiza regex para suportar novos formatos de ID e adiciona código de prefixo ECOSYSTEM
@github-actions
Copy link

Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository.

This Pull Request will close automatically.

Thanks!

@github-actions github-actions bot closed this Oct 17, 2025
@annacia annacia deleted the annacia/PIXKEY-242 branch October 17, 2025 20:10
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.