Skip to content

Conversation

michaelborn
Copy link
Contributor

If a developer declines to set a value for
moduleSettings.cbSecurity.rules when configuring cbSecurity, they get an error:

Element SETTINGS.RULES is undefined in ARGUMENTS.

IMHO, this is a failure on Coldbox's part to properly merge the
dev-defined coldbox moduleSettings.cbSecurity struct with cbSecurity's
own settings struct. Regardless, I'd expect the rules array to
default to an empty array as documented.

If a developer declines to set a value for
`moduleSettings.cbSecurity.rules`, they get an error:

```
Element SETTINGS.RULES is undefined in ARGUMENTS.
```

IMHO, this is a failure on Coldbox's part to properly merge the
dev-defined coldbox `moduleSettings.cbSecurity` struct with cbSecurity's
own `settings` struct. Regardless, I'd expect the `rules` array to
default to an empty array _[as documented](https://coldbox-security.ortusbooks.com/getting-started/first-chapter)_.
@michaelborn
Copy link
Contributor Author

We can probably decline this PR. The only circumstance in which this "bug" occurs is when a dumb developer (cough, sortof me, sortof) tries to manually run the cbSecurity.interceptors.Security interceptor and passes an invalid configuration by declining to set a rules property/array.

@lmajano lmajano merged commit 62da75a into coldbox-modules:development Dec 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants