Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Domain observable with underscore is incorrectly rejected #7620

Closed
samczsun opened this issue Jul 6, 2024 · 4 comments
Closed

Domain observable with underscore is incorrectly rejected #7620

samczsun opened this issue Jul 6, 2024 · 4 comments
Assignees
Labels
bug use for describing something not working as expected datamodel Linked to any change in the data model solved use to identify issue that has been solved (must be linked to the solving PR)

Comments

@samczsun
Copy link

samczsun commented Jul 6, 2024

Description

This regex does not accept underscores in domains, but underscores are permitted in domains.

export const domainChecker = /^(|([\p{L}\d]|[\p{L}\d][\p{L}\d\p{Pd}]*[\p{L}\d])\.)*([\p{L}\d]|[\p{L}\d][\p{L}\d\p{Pd}]*[\p{L}\d])$/u;

Environment

  1. OS (where OpenCTI server runs): Ubuntu
  2. OpenCTI version: 6.1.11
  3. OpenCTI client: Frontend
  4. Other environment details:

Reproducible Steps

Steps to create the smallest reproducible scenario:

  1. Create domain observable with domain that contains an underscore, such as example_domain.godaddysites.com

Expected Output

An observable is created

Actual Output

An error occurs

Additional information

Screenshots (optional)

@samczsun samczsun added bug use for describing something not working as expected needs triage use to identify issue needing triage from Filigran Product team labels Jul 6, 2024
@Jipegien
Copy link
Member

RFCs forbid use of underscore in domain names BUT some registrars allow it in subdomains.
We need to modify the regexp to accept underscores in subdomains, but not the domain itself and the TLD

@Jipegien Jipegien removed the needs triage use to identify issue needing triage from Filigran Product team label Jul 11, 2024
@Jipegien Jipegien added this to the Bugs backlog milestone Jul 11, 2024
@Jipegien Jipegien added the datamodel Linked to any change in the data model label Jul 11, 2024
@SarahBocognano SarahBocognano self-assigned this Jul 11, 2024
SarahBocognano added a commit that referenced this issue Jul 15, 2024
@SarahBocognano SarahBocognano added the solved use to identify issue that has been solved (must be linked to the solving PR) label Jul 16, 2024
@romain-filigran
Copy link
Member

I reopened this issue as I get some ingestion error when trying to create domain observable with value: "test._mysubdomain.mydomain.com"

@romain-filigran romain-filigran removed the solved use to identify issue that has been solved (must be linked to the solving PR) label Sep 30, 2024
@SarahBocognano
Copy link
Member

SarahBocognano commented Oct 2, 2024

@romain-filigran It's because you put the dot before the underscore. Do we want it possible ? If yes I can of course modify the regex to accept a dot followed by an underscore

@aHenryJard
Copy link
Member

Reopening: This feature has been reverted du to performance issues, we need to add a test coverage on regeprx performance issue.

@aHenryJard aHenryJard reopened this Nov 7, 2024
@aHenryJard aHenryJard removed the solved use to identify issue that has been solved (must be linked to the solving PR) label Nov 7, 2024
@SarahBocognano SarahBocognano added the solved use to identify issue that has been solved (must be linked to the solving PR) label Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug use for describing something not working as expected datamodel Linked to any change in the data model solved use to identify issue that has been solved (must be linked to the solving PR)
Projects
None yet
Development

No branches or pull requests

6 participants