File tree Expand file tree Collapse file tree 3 files changed +24
-0
lines changed
Expand file tree Collapse file tree 3 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -675,6 +675,7 @@ Examples:
675675- ❌ ` ws://api.trigger.dev ` / ` wss://api.trigger.dev `
676676- ❌ ` https://api.trigger.dev/\ninternal `
677677- ❌ ` https://api.trigger.dev/\tinternal `
678+ - ❌ ` https://api.trigger.dev/\rinternal `
678679
679680Validation errors use these exact messages:
680681
Original file line number Diff line number Diff line change @@ -182,6 +182,7 @@ Examples:
182182- ❌ ` ws://api.trigger.dev ` / ` wss://api.trigger.dev ` (websocket protocols are rejected)
183183- ❌ ` https://api.trigger.dev/\ninternal ` (internal whitespace characters)
184184- ❌ ` https://api.trigger.dev/\tinternal ` (internal tab characters)
185+ - ❌ ` https://api.trigger.dev/\rinternal ` (internal carriage-return characters)
185186
186187Validation errors use these exact messages:
187188
Original file line number Diff line number Diff line change @@ -742,6 +742,17 @@ describe("TriggerChatTransport", function () {
742742 } ) . toThrowError ( "baseURL must not contain internal whitespace characters" ) ;
743743 } ) ;
744744
745+ it ( "throws when baseURL contains internal carriage-return characters" , function ( ) {
746+ expect ( function ( ) {
747+ new TriggerChatTransport ( {
748+ task : "chat-task" ,
749+ accessToken : "pk_trigger" ,
750+ baseURL : "https://api.trigger.dev/\rinternal" ,
751+ stream : "chat-stream" ,
752+ } ) ;
753+ } ) . toThrowError ( "baseURL must not contain internal whitespace characters" ) ;
754+ } ) ;
755+
745756 it ( "throws when baseURL is a relative path" , function ( ) {
746757 expect ( function ( ) {
747758 new TriggerChatTransport ( {
@@ -3327,6 +3338,17 @@ describe("TriggerChatTransport", function () {
33273338 } ) . toThrowError ( "baseURL must not contain internal whitespace characters" ) ;
33283339 } ) ;
33293340
3341+ it ( "throws from factory when baseURL contains internal carriage-return characters" , function ( ) {
3342+ expect ( function ( ) {
3343+ createTriggerChatTransport ( {
3344+ task : "chat-task" ,
3345+ accessToken : "pk_trigger" ,
3346+ baseURL : "https://api.trigger.dev/\rinternal" ,
3347+ stream : "chat-stream" ,
3348+ } ) ;
3349+ } ) . toThrowError ( "baseURL must not contain internal whitespace characters" ) ;
3350+ } ) ;
3351+
33303352 it ( "throws from factory when baseURL protocol is not http or https" , function ( ) {
33313353 expect ( function ( ) {
33323354 createTriggerChatTransport ( {
You can’t perform that action at this time.
0 commit comments