drupal-client icon indicating copy to clipboard operation
drupal-client copied to clipboard

getCsrfToken does not correctly detect empty X-CSRF-Token

Open adaptive-webdev opened this issue 10 years ago • 2 comments

existingToken can be a string 'null' (not empty). Therefore, the if (existingToken) statement is evaluated as true when existingToken is a string 'null'. A possible fix is changing the if statement to if ((existingToken) && ('null' != existingToken)).

adaptive-webdev avatar Jan 14 '15 16:01 adaptive-webdev

I second this! I learned this the very hard way, it is a problem on existingToken as well as within the systemConnect function. It will cause the application to rapidly make requests that fail over and over.

pvandrunen avatar Jul 03 '15 05:07 pvandrunen

adaptive, where should i add that check?

clowNay avatar Jul 06 '15 23:07 clowNay