Skip to content

Commit 7e72b83

Browse files
committed
👌 IMPROVE: threadsafe annotation to all models to prevent invalid creations under load, since we don't use circular dependencies.
1 parent 4de9591 commit 7e72b83

File tree

8 files changed

+15
-7
lines changed

8 files changed

+15
-7
lines changed

‎changelog.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
----
99

10+
## [2.14.0] => 2021-OCT-07
11+
12+
### Added
13+
14+
* `threadsafe` annotation to all models to prevent invalid creations under load, since we don't use circular dependencies.
15+
16+
----
17+
1018
## [2.13.0] => 2021-SEP-02
1119

1220
### Added

‎models/CBSecurity.cfc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* cbsecure().secure();
1717
* </pre>
1818
*/
19-
component singleton accessors="true" {
19+
component threadsafe singleton accessors="true" {
2020

2121
/*********************************************************************************************/
2222
/** DI **/

‎models/jwt/JwtService.cfc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* This is the JWT Services that will provide you with glorious JWT capabilities.
66
* Learn more about Json Web Tokens here: https://jwt.io/
77
*/
8-
component accessors="true" singleton {
8+
component accessors="true" singleton threadsafe{
99

1010
/*********************************************************************************************/
1111
/** DI **/

‎models/jwt/storages/CacheTokenStorage.cfc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* ---
55
* A CacheBox cache based token storage
66
*/
7-
component accessors="true" singleton {
7+
component accessors="true" singleton threadsafe{
88

99
// DI
1010
property name="wirebox" inject="wirebox";

‎models/jwt/storages/DBTokenStorage.cfc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
* - subject : varchar 255
2121
*
2222
*/
23-
component accessors="true" singleton {
23+
component accessors="true" singleton threadsafe{
2424

2525
// DI
2626
property name="wirebox" inject="wirebox";

‎models/util/RulesLoader.cfc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* ---
55
* Rule loader service
66
*/
7-
component accessors="true" singleton {
7+
component accessors="true" singleton threadsafe{
88

99
// DI
1010
property name="controller" inject="coldbox";

‎models/validators/CBAuthValidator.cfc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* This is the core validator which leverages CBAuth
66
* https://helpx.adobe.com/coldfusion/developing-applications/developing-cfml-applications/securing-applications/using-coldfusion-security-tags-and-functions.html
77
*/
8-
component singleton {
8+
component singleton threadsafe{
99

1010
// Injection
1111
property name="cbSecurity" inject="CBSecurity@cbSecurity";

‎models/validators/CFValidator.cfc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* This is the core validator which leverages CF Security via cflogin and cfloginuser
66
* https://helpx.adobe.com/coldfusion/developing-applications/developing-cfml-applications/securing-applications/using-coldfusion-security-tags-and-functions.html
77
*/
8-
component singleton {
8+
component singleton threadsafe{
99

1010
/**
1111
* This function is called once an incoming event matches a security rule.

0 commit comments

Comments
 (0)