I get the following when following your suggestion:
The key specified is not a valid key for this encryption: Invalid AES key length.csrf.cfm line 152- /Users/brandonshea/Sites/ctia-web-services/src/wheels/controller/csrf.cfm line 152
- /Users/brandonshea/Sites/ctia-web-services/src/wheels/controller/csrf.cfm line 120
- /Users/brandonshea/Sites/ctia-web-services/src/wheels/controller/csrf.cfm line 94
- /Users/brandonshea/Sites/ctia-web-services/src/wheels/controller/csrf.cfm line 31
- /Users/brandonshea/Sites/ctia-web-services/src/wheels/controller/processing.cfm line 13
- /Users/brandonshea/Sites/ctia-web-services/src/wheels/global/misc.cfm line 301
- /Users/brandonshea/Sites/ctia-web-services/src/tests/controllers/api/v1/TestRequestsController.cfc line 13
I checked the values passed into Encrypt(),
application.wheels.csrfCookieEncryptionSecretKey: ""
application.wheels.csrfCookieEncryptionAlgorithm: "AES"
application.wheels.csrfCookieEncryptionEncoding: "Base64"
Generating a key for the secret key didn't alleviate the above problem either.
Might be an ignorant suggestion, but might it be possible to skip this step of generating a token if csrfStore is not set to session or cookie? Something like this:
public string function $generateAuthenticityToken() {
if (application.wheels.csrfStore == "session") {
return CSRFGenerateToken();
} else if (application.wheels.csrfStore == "cookie") {
return $generateCookieAuthenticityToken();
} else
return;
}
I don't know what the consequences of such a change would be, so let me know your thoughts! Thank you.