Skip to content

Commit

Permalink
Merge pull request #48 from coldbox-modules/development
Browse files Browse the repository at this point in the history
3.4.2
  • Loading branch information
lmajano authored Sep 13, 2023
2 parents 5fb88d1 + 1dd0843 commit b84aaf7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion box.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name":"ColdBox Security",
"version":"3.4.1",
"version":"3.4.2",
"location":"https://downloads.ortussolutions.com/ortussolutions/coldbox-modules/cbsecurity/@build.version@/[email protected]@.zip",
"author":"Ortus Solutions.com <[email protected]>",
"slug":"cbsecurity",
Expand Down
6 changes: 6 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- `cbsecurity_logs` is hard coded instead of using module setting

## [3.4.1] - 2023-08-09

### Fixed

- Parenthesis on `top` statements for MSSQL Server on the `DBLogger` thanks to @irvirv

## [3.4.0] - 2023-06-14
Expand Down
8 changes: 4 additions & 4 deletions models/util/DBLogger.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ component accessors="true" singleton threadsafe {
"select
#getLimitStart()#
count( id ) as total, #arguments.column#
from cbsecurity_logs
from #getTable()#
group by #arguments.column#
order by count( id ) desc
#getLimitEnd()#
Expand All @@ -207,8 +207,8 @@ component accessors="true" singleton threadsafe {
struct function getActionsReport(){
return queryExecute(
"select
count( id ) as total, action, ( count(id) / ( select count(id) from cbsecurity_logs ) ) * 100 as percentage
from cbsecurity_logs
count( id ) as total, action, ( count(id) / ( select count(id) from #getTable()# ) ) * 100 as percentage
from #getTable()#
group by action",
{},
{ datasource : variables.settings.firewall.logs.dsn }
Expand All @@ -230,7 +230,7 @@ component accessors="true" singleton threadsafe {
*/
struct function getBlockTypesReport(){
return queryExecute(
"select count( id ) as total, blockType from cbsecurity_logs group by blockType",
"select count( id ) as total, blockType from #getTable()# group by blockType",
{},
{ datasource : variables.settings.firewall.logs.dsn }
).reduce( ( results, row ) => {
Expand Down

0 comments on commit b84aaf7

Please sign in to comment.