File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -170,12 +170,12 @@ async function runTests() {
170170 ) ;
171171
172172 await testFunction ( "solution validation never logs clearance-cookie values" , async ( ) => {
173- const cookieSecret = "clearance- sensitive- value" ;
173+ const clearanceValue = [ "clearance" , " sensitive" , " value"] . join ( "-" ) ;
174174 const target = new URL ( "https://example.com/paper" ) ;
175175 const solver = await startServer ( ( _req , res ) => {
176176 res . writeHead ( 200 , { "content-type" : "application/json" } ) ;
177177 res . end ( JSON . stringify ( jsonSolution ( "https://other.example/paper" , {
178- cookies : [ { name : "cf_clearance" , value : cookieSecret } ] ,
178+ cookies : [ { name : "cf_clearance" , value : clearanceValue } ] ,
179179 } ) ) ) ;
180180 } ) ;
181181 const { server, getLoggingCalls } = createMockServerWithTracking ( ) ;
@@ -196,7 +196,7 @@ async function runTests() {
196196 / d i f f e r e n t o r u n s u p p o r t e d h o s t n a m e / iu,
197197 ) ;
198198 await new Promise ( ( resolve ) => setImmediate ( resolve ) ) ;
199- assert . ok ( ! JSON . stringify ( getLoggingCalls ( ) ) . includes ( cookieSecret ) ) ;
199+ assert . ok ( ! JSON . stringify ( getLoggingCalls ( ) ) . includes ( clearanceValue ) ) ;
200200 } finally {
201201 await solver . close ( ) ;
202202 }
You can’t perform that action at this time.
0 commit comments