TrackAPI/ProfileAPI: Should use consistent message with Scope containing invalid characters

Found in

EPiServer.Profiles.Client 1.5.0

Fixed in

EPiServer.Profiles.Client 1.7.0

Created

Aug 17, 2018

Updated

Nov 29, 2018

State

Closed, Fixed and tested


Description

1.Create new trackevent / profile/ segment with invalid characters (/,*?<>| or space) in Scope: /api/v1.0/Track

{ "Scope": "abc?", "DeviceId": "123123213", "EventType": "test1", "Value": "test1" }

-> Return: 400 Bad Request with message:

Scope cannot contain any of Slash (/), Backslash (\\), Asterisk (*), Question mark(?), Less than (<), Greater than (>), Vertical bar (|), Space ( ), Comma(,).

2.1.Create new trackevent / profile/ segment with invalid characters Sharp(#) or Dot (.) in Scope:

{ "Scope": "abc#", "DeviceId": "123123213", "EventType": "test1", "Value": "test1" }

or

{ "Scope": "ab.", "DeviceId": "123123213", "EventType": "test1", "Value": "test1" }
  • Expected: Returns 400 Bad request with similar message in step 1:

    Scope cannot contain any of Slash (/), Backslash (\\), Asterisk (*), Question mark(?), Less than (<), Greater than (>), Vertical bar (|), Space ( ), Comma(,), Dot(.), Sharp(#)
    

  • Actual: Returns 400 Bad request with message:

    Scope cannot contain a Sharp (#).