Skip to content

[Bug]: Prevent to call AdobeCommerce when the data is not valid #1388

@marc-arnoult

Description

@marc-arnoult

Expected Behavior

Actually when a client and/or a bot make a call to VSF all the data is submitted to AdobeCommerce, we should Fail fast and prevent to call AdobeCommerce when the data is not valid or even not present.

Actual Behavior

Every call is directly submitted to AdobeCommerce without validation.

It can lead to slowness of NodeJS and AdobeCommerce. Specially when a bot attack and/or crawl our endpoints.

Possible Solution

Validate the data before submitted them to AdobeCommerce.

Steps to reproduce

Make a fetch call with an empty and/or invalid body.

What version of Magento 2 integration are you using?

2.4.5

What version of Node.js are you using?

16.13

What browser (and version) are you using?

Chrome, Safari

What operating system (and version) are you using?

macOS

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriage-neededIssues that need to be checked

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions