drupal-client
drupal-client copied to clipboard
getCsrfToken does not correctly detect empty X-CSRF-Token
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)).
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.
adaptive, where should i add that check?