Skip to content

Commit 0a25b5c

Browse files
authored
Merge pull request #1921 from hackmdio/release/2.6.0
Release 2.6.0
2 parents da511d0 + 3d74608 commit 0a25b5c

File tree

36 files changed

+3468
-595
lines changed

36 files changed

+3468
-595
lines changed

.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# [Choice] Node.js version: 16, 14
2-
ARG VARIANT=14-buster
2+
ARG VARIANT=14-bullseye
33
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT}
44

55
# [Optional] Uncomment this section to install additional OS packages.

.devcontainer/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ services:
66
context: ..
77
dockerfile: .devcontainer/Dockerfile
88
args:
9-
VARIANT: 14-buster
9+
VARIANT: 14-bullseye
1010
environment:
1111
- CMD_DB_URL=postgres://codimd:codimd@localhost/codimd
1212
- CMD_USECDN=false

.github/workflows/build.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,25 @@ jobs:
1010
runs-on: ubuntu-latest
1111
strategy:
1212
matrix:
13-
node-version: [14.x, 16.x]
13+
node-version: [16.x]
1414

1515
steps:
16-
- uses: actions/checkout@v2
16+
- uses: actions/checkout@v4
1717

1818
# from https://stackoverflow.com/a/69649733
1919
- name: Reconfigure git to use HTTP authentication
2020
run: >
2121
git config --global url."https://github.com/".insteadOf
2222
2323
24-
- uses: actions/cache@v2
24+
- uses: actions/cache@v4
2525
with:
2626
path: ~/.npm
2727
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
2828
restore-keys: |
2929
${{ runner.os }}-node-
3030
31-
- uses: actions/setup-node@v2
31+
- uses: actions/setup-node@v4
3232
name: Use Node.js ${{ matrix.node-version }}
3333
with:
3434
node-version: ${{ matrix.node-version }}
@@ -43,8 +43,8 @@ jobs:
4343
if: github.ref == 'refs/heads/master' || github.event.pull_request
4444

4545
steps:
46-
- uses: actions/checkout@v2
47-
- uses: actions/setup-node@v2
46+
- uses: actions/checkout@v4
47+
- uses: actions/setup-node@v4
4848
name: Use Node.js 14
4949
with:
5050
node-version: 14

.github/workflows/check-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313

1414
steps:
1515
- name: Checkout code
16-
uses: actions/checkout@v3
16+
uses: actions/checkout@v4
1717
with:
1818
fetch-depth: 0
1919

FUNDING.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"drips": {
3+
"ethereum": {
4+
"ownedBy": "0xEd37B84FD84A834886aC07693aF6A9cd35040002"
5+
}
6+
}
7+
}

deployments/docker-compose.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,14 @@ services:
1212
codimd:
1313
# you can use image or custom build below,
1414
image: nabo.codimd.dev/hackmdio/hackmd:2.5.3
15+
# Using the following command to trigger the build
16+
# docker-compose -f deployments/docker-compose.yml up --build
1517
# build:
1618
# context: ..
1719
# dockerfile: ./deployments/Dockerfile
20+
# args:
21+
# RUNTIME: hackmdio/runtime:16.20.2-35fe7e39
22+
# BUILDPACK: hackmdio/buildpack:16.20.2-35fe7e39
1823
environment:
1924
- CMD_DB_URL=postgres://codimd:change_password@database/codimd
2025
- CMD_USECDN=false

lib/auth/bitbucket/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ const bitbucketAuth = module.exports = Router()
1111
passport.use(new BitbucketStrategy({
1212
clientID: config.bitbucket.clientID,
1313
clientSecret: config.bitbucket.clientSecret,
14-
callbackURL: config.serverURL + '/auth/bitbucket/callback'
14+
callbackURL: config.serverURL + '/auth/bitbucket/callback',
15+
state: true
1516
}, passportGeneralCallback))
1617

1718
bitbucketAuth.get('/auth/bitbucket', function (req, res, next) {

lib/auth/dropbox/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ passport.use(new DropboxStrategy({
1212
apiVersion: '2',
1313
clientID: config.dropbox.clientID,
1414
clientSecret: config.dropbox.clientSecret,
15-
callbackURL: config.serverURL + '/auth/dropbox/callback'
15+
callbackURL: config.serverURL + '/auth/dropbox/callback',
16+
state: true
1617
}, passportGeneralCallback))
1718

1819
dropboxAuth.get('/auth/dropbox', function (req, res, next) {

lib/auth/email/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
const Router = require('express').Router
44
const passport = require('passport')
5+
const sequelize = require('sequelize')
56
const validator = require('validator')
67
const LocalStrategy = require('passport-local').Strategy
78
const config = require('../../config')
@@ -21,7 +22,10 @@ passport.use(new LocalStrategy({
2122
try {
2223
const user = await models.User.findOne({
2324
where: {
24-
email: email
25+
email: sequelize.where(
26+
sequelize.fn('LOWER', sequelize.col('email')),
27+
email.toLowerCase()
28+
)
2529
}
2630
})
2731

lib/auth/facebook/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ const facebookAuth = module.exports = Router()
1212
passport.use(new FacebookStrategy({
1313
clientID: config.facebook.clientID,
1414
clientSecret: config.facebook.clientSecret,
15-
callbackURL: config.serverURL + '/auth/facebook/callback'
15+
callbackURL: config.serverURL + '/auth/facebook/callback',
16+
state: true
1617
}, passportGeneralCallback))
1718

1819
facebookAuth.get('/auth/facebook', function (req, res, next) {

0 commit comments

Comments
 (0)