opencti icon indicating copy to clipboard operation
opencti copied to clipboard

External reference URL are not properly validated during creation

Open JeremyCloarec opened this issue 1 year ago • 1 comments

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)

JeremyCloarec avatar Jun 20 '24 09:06 JeremyCloarec

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

Archidoit avatar Jun 20 '24 09:06 Archidoit