OpenCTI-Platform / opencti

Open Cyber Threat Intelligence Platform
https://opencti.io
Other
5.14k stars 812 forks source link

External reference URL are not properly validated during creation #7431

Open JeremyCloarec opened 1 week ago

JeremyCloarec commented 1 week ago

Description

The validation doesn't recognize some valid URLs. URLs in the form of http://localhost:4000/storage/get/* are not accepted for exemple, as well as ftp addresses.

Environment

  1. OS (where OpenCTI server runs): { e.g. Mac OS 10, Windows 10, Ubuntu 16.4, etc. }
  2. OpenCTI version: { e.g. OpenCTI 1.0.2 }
  3. OpenCTI client: { e.g. frontend or python }
  4. Other environment details:

Reproducible Steps

Steps to create the smallest reproducible scenario:

  1. Go to External references
  2. Click on create an external ref
  3. Set URL to http://localhost:4000/storage/get/blabla.txt

Expected Output

URL is validated

Actual Output

We get a message saying that 'The value must be an URL'

Additional information

Screenshots (optional)

Archidoit commented 1 week ago

Other scenario :

Create an entity with a file. The external ref is well created. Click on Update the external ref : image

Change the source name. An error occurs for the URL field : image

But the external ref is well updated if we leave the edition form : image