Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions .bxlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"diagnostics": {
"duplicateMethod": {
"enabled": true,
"severity": "error"
},
"duplicateProperty": {
"enabled": true,
"severity": "error"
},
"emptyCatchBlock": {
"enabled": true,
"severity": "warning"
},
"invalidExtends": {
"enabled": false,
"severity": "error"
},
"invalidImplements": {
"enabled": false,
"severity": "error"
},
"missingQueryParamCfsqltype": {
"enabled": true,
"severity": "warning"
},
"missingReturnStatement": {
"enabled": true,
"severity": "warning"
},
"shadowedVariable": {
"enabled": true,
"severity": "warning"
},
"unescapedQueryParam": {
"enabled": true,
"severity": "warning"
},
"unreachableCode": {
"enabled": true,
"severity": "warning"
},
"unscopedVariable": {
"enabled": true,
"severity": "warning"
},
"unusedImport": {
"enabled": true,
"severity": "warning"
},
"unusedPrivateMethod": {
"enabled": true,
"severity": "warning"
},
"unusedVariable": {
"enabled": true,
"severity": "hint"
}
},
"include": [],
"exclude": [],
"mappings": {},
"formatting": {
"experimental": {
"enabled": false
}
}
}
62 changes: 0 additions & 62 deletions .cflintrc

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
runs-on: ubuntu-24.04
steps:
- name: Checkout Repository
uses: actions/checkout@v4
uses: actions/checkout@v7

- uses: Ortus-Solutions/commandbox-action@v1.0.2
with:
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ jobs:
issues: write
steps:
- name: Checkout Repository
uses: actions/checkout@v4
uses: actions/checkout@v7

- name: Setup CommandBox
uses: Ortus-Solutions/setup-commandbox@v2.0.1
uses: ortus-boxlang/setup-boxlang@1.4.0
with:
forgeboxAPIKey: ${{ secrets.FORGEBOX_TOKEN }}

- name: Setup Java
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
distribution: "temurin"
java-version: ${{ env.JDK }}
Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
box task run taskfile=build/Build target=run :version=${{ env.VERSION }} :projectName=${{ env.MODULE_ID }} :buildID=${{ env.BUILD_ID }} :branch=${{ env.BRANCH }}

- name: Commit Changelog [unreleased] with latest version
uses: EndBug/add-and-commit@v9.1.4
uses: EndBug/add-and-commit@v10.0.0
if: env.SNAPSHOT == 'false'
with:
author_name: Github Actions
Expand All @@ -97,7 +97,7 @@ jobs:

- name: Upload Build Artifacts
if: success()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: ${{ env.MODULE_ID }}
path: |
Expand Down Expand Up @@ -133,7 +133,7 @@ jobs:
box forgebox publish --force

- name: Create Github Release
uses: taiki-e/create-gh-release-action@v1.8.2
uses: taiki-e/create-gh-release-action@v1.11.0
continue-on-error: true
if: env.SNAPSHOT == 'false'
with:
Expand Down Expand Up @@ -170,17 +170,17 @@ jobs:
steps:
# Checkout development
- name: Checkout Repository
uses: actions/checkout@v4
uses: actions/checkout@v7
with:
ref: development

- name: Setup CommandBox
uses: Ortus-Solutions/setup-commandbox@v2.0.1
uses: ortus-boxlang/setup-boxlang@1.4.0
with:
forgeboxAPIKey: ${{ secrets.FORGEBOX_TOKEN }}

- name: Download build artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
name: ${{ env.MODULE_ID }}
path: .tmp
Expand All @@ -197,7 +197,7 @@ jobs:

# Commit it back to development
- name: Commit Version Bump
uses: EndBug/add-and-commit@v9.1.4
uses: EndBug/add-and-commit@v10.0.0
with:
author_name: Github Actions
author_email: info@ortussolutions.com
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
contents: write
checks: write
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7

- name: Auto-format
uses: Ortus-Solutions/commandbox-action@v1.0.2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ jobs:

- name: Upload Test Results to Artifacts
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: test-results-${{ matrix.cfengine }}-${{ matrix.coldboxVersion }}
path: |
Expand All @@ -113,7 +113,7 @@ jobs:

- name: Upload Debug Logs To Artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: Failure Debugging Info - ${{ matrix.cfengine }} - ${{ matrix.coldboxVersion }}
path: |
Expand Down
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.7.1",
"version":"3.7.2",
"location":"https://downloads.ortussolutions.com/ortussolutions/coldbox-modules/cbsecurity/@build.version@/cbsecurity-@build.version@.zip",
"author":"Ortus Solutions.com <info@ortussolutions.com>",
"slug":"cbsecurity",
Expand Down
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### 🐛 Fixed

- Updates for MySQL indexes on version 8+ and index keys to avoid max key length issues with long VARCHAR fields. The `DBLogger` model now creates indexes with a 255 character prefix for `userAgent`, `host`, `path`, and `referer` fields when using MySQL to prevent exceeding the 3072 byte key limit.

## [3.7.1] - 2026-05-21

### Fixed
Expand Down
8 changes: 7 additions & 1 deletion models/util/DBLogger.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -449,8 +449,14 @@ component accessors="true" singleton threadsafe {
];

indexColumns.each( ( key ) => {
var indexDefinition = "#key#";
// For MySQL, limit VARCHAR(1024) index prefix to avoid exceeding 3072 byte key limit
var longVarcharCols = [ "userAgent", "host", "path", "referer" ];
if ( getDatabaseVendor() == "MySQL" && longVarcharCols.find( key ) > 0 ) {
indexDefinition = "#key#(255)";
}
queryExecute(
"CREATE INDEX idx_cbsecurity_#key# ON #getTable()# (#key#)",
"CREATE INDEX idx_cbsecurity_#key# ON #getTable()# (#indexDefinition#)",
{},
{ datasource : variables.settings.firewall.logs.dsn }
);
Expand Down
Loading