Skip to content

Commit

Permalink
ci: mark win as experimental
Browse files Browse the repository at this point in the history
  • Loading branch information
msimerson committed Feb 19, 2024
1 parent bec3290 commit cfd8583
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 12 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,9 @@ jobs:

test-mac:
needs: [ lint, get-lts ]
runs-on: ${{ matrix.os }}
runs-on: macos-latest
strategy:
matrix:
os: [macos-latest]
node-version: ${{ fromJson(needs.get-lts.outputs.active) }}
fail-fast: false
steps:
Expand All @@ -90,12 +89,12 @@ jobs:
test-win:
# if: false
needs: [ lint, get-lts ]
runs-on: ${{ matrix.os }}
runs-on: windows-latest
strategy:
matrix:
os: [windows-latest]
node-version: ${{ fromJson(needs.get-lts.outputs.active) }}
fail-fast: false
experimental: true
steps:
- name: Install MySQL
run: |
Expand Down
6 changes: 4 additions & 2 deletions lib/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ class User {
const u = await this.read({ nt_user_id: args.nt_user_id })
if (u.length === 1) {
await mysql.execute(`UPDATE nt_user SET deleted=? WHERE nt_user_id=?`, [
val ?? 1, u[0].nt_user_id,
val ?? 1,
u[0].nt_user_id,
])
}
}
Expand Down Expand Up @@ -124,7 +125,8 @@ class User {

// Check for HMAC SHA-1 password
if (/^[0-9a-f]{40}$/.test(passDb)) {
const digest = crypto.createHmac('sha1', username.toLowerCase())
const digest = crypto
.createHmac('sha1', username.toLowerCase())
.update(passTry)

Check failure

Code scanning / CodeQL

Use of password hash with insufficient computational effort High

Password from
an access to password
is hashed insecurely.
.digest('hex')
if (this.debug) console.log(`digest: (${digest === passDb}) ${digest}`)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"prettier": "npx prettier *.js lib routes test html --check",
"prettier:fix": "npm run prettier -- --write",
"start": "NODE_ENV=production node ./server",
"test": "test/run.sh",
"test": "test/fixtures/run.sh",
"versions": "npx dependency-version-checker check",
"watch": "npm run test -- --watch"
},
Expand Down
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions test/fixtures/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh

node test/fixtures/.setup.js
node --test
node test/fixtures/.teardown.js
5 changes: 0 additions & 5 deletions test/run.sh

This file was deleted.

0 comments on commit cfd8583

Please sign in to comment.