Compare commits

...

96 commits
v2.1.0 ... main

Author SHA1 Message Date
Ravinou ea5d565567
Merge pull request #224 from Ravinou/dependabot/npm_and_yarn/chart.js-4.4.3
build(deps): bump chart.js from 4.4.2 to 4.4.3
2024-05-26 11:15:56 +02:00
Ravinou fa218b0522
Merge pull request #226 from Ravinou/dependabot/npm_and_yarn/react-hook-form-7.51.5
build(deps): bump react-hook-form from 7.51.4 to 7.51.5
2024-05-25 00:01:28 +02:00
dependabot[bot] 56098d3f8d
build(deps): bump chart.js from 4.4.2 to 4.4.3
Bumps [chart.js](https://github.com/chartjs/Chart.js) from 4.4.2 to 4.4.3.
- [Release notes](https://github.com/chartjs/Chart.js/releases)
- [Commits](https://github.com/chartjs/Chart.js/compare/v4.4.2...v4.4.3)

---
updated-dependencies:
- dependency-name: chart.js
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-24 21:25:28 +00:00
Ravinou 08e6b0e6a6
Merge pull request #227 from Ravinou/dependabot/npm_and_yarn/tabler/icons-react-3.5.0
build(deps): bump @tabler/icons-react from 3.3.0 to 3.5.0
2024-05-24 23:24:02 +02:00
dependabot[bot] a79a91ecb0
---
updated-dependencies:
- dependency-name: "@tabler/icons-react"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-21 19:57:00 +00:00
dependabot[bot] 779cceacf2
---
updated-dependencies:
- dependency-name: react-hook-form
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-21 19:56:46 +00:00
Ravinou 94fd0c6188
🥇 Thanking a new sponsor 🥇
Thank you very much @royalmoose for sponsoring ! This commit is dedicated to thanking you. You give me strength to continue the work!
2024-05-13 22:24:53 +02:00
Ravinou 09224e6f24
2.3.0 2024-05-12 18:10:12 +02:00
Ravinou 0ed03e9433
Merge pull request #220 from Ravinou/develop
feat: add borgbackup "append-only" mode as option to repo !
2024-05-12 18:03:29 +02:00
Ravinou 76d11d83f7
feat: add borgbackup "append-only" mode as option to repo ! #160 2024-05-12 17:52:38 +02:00
Ravinou 6b43c38cc2
Merge pull request #219 from Ravinou/develop
Update dep.
2024-05-10 20:44:28 +02:00
Ravinou 7687f10b7e
feat: notifications are now stacked 2024-05-10 18:54:01 +02:00
Ravinou 9c28a11320
chore: remove eslint and update react-toastify 2024-05-10 18:53:32 +02:00
Ravinou 5162000e25
Merge pull request #218 from Ravinou/dependabot/npm_and_yarn/react-dom-18.3.1
build(deps): bump react-dom from 18.2.0 to 18.3.1
2024-05-09 22:48:10 +02:00
Ravinou 3b5100acee
Merge pull request #217 from Ravinou/dependabot/npm_and_yarn/react-18.3.1
build(deps): bump react from 18.2.0 to 18.3.1
2024-05-09 22:47:56 +02:00
dependabot[bot] 3332d5ecf6
build(deps): bump react-dom from 18.2.0 to 18.3.1
Bumps [react-dom](https://github.com/facebook/react/tree/HEAD/packages/react-dom) from 18.2.0 to 18.3.1.
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/v18.3.1/packages/react-dom)

---
updated-dependencies:
- dependency-name: react-dom
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-09 20:39:55 +00:00
dependabot[bot] e4ef267637
build(deps): bump react from 18.2.0 to 18.3.1
Bumps [react](https://github.com/facebook/react/tree/HEAD/packages/react) from 18.2.0 to 18.3.1.
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/v18.3.1/packages/react)

---
updated-dependencies:
- dependency-name: react
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-09 20:39:53 +00:00
Ravinou 97904d2cd4
Merge pull request #216 from Ravinou/dependabot/npm_and_yarn/react-hook-form-7.51.4
build(deps): bump react-hook-form from 7.51.2 to 7.51.4
2024-05-09 22:39:11 +02:00
dependabot[bot] d3e1c79a4b
build(deps): bump react-hook-form from 7.51.2 to 7.51.4
Bumps [react-hook-form](https://github.com/react-hook-form/react-hook-form) from 7.51.2 to 7.51.4.
- [Release notes](https://github.com/react-hook-form/react-hook-form/releases)
- [Changelog](https://github.com/react-hook-form/react-hook-form/blob/master/CHANGELOG.md)
- [Commits](https://github.com/react-hook-form/react-hook-form/compare/v7.51.2...v7.51.4)

---
updated-dependencies:
- dependency-name: react-hook-form
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-09 19:26:55 +00:00
Ravinou 5ebd2ea881
Merge pull request #211 from Ravinou/dependabot/npm_and_yarn/next-14.2.3
build(deps): bump next from 14.1.4 to 14.2.3
2024-05-09 18:30:04 +02:00
dependabot[bot] f3f3789b87
build(deps): bump next from 14.1.4 to 14.2.3
Bumps [next](https://github.com/vercel/next.js) from 14.1.4 to 14.2.3.
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/compare/v14.1.4...v14.2.3)

---
updated-dependencies:
- dependency-name: next
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-09 16:18:07 +00:00
Ravinou ee244ff0d2
Merge pull request #212 from Ravinou/dependabot/npm_and_yarn/eslint-config-next-14.2.3
build(deps-dev): bump eslint-config-next from 14.1.4 to 14.2.3
2024-05-09 18:17:44 +02:00
Ravinou 9b3d2e8698
Merge pull request #214 from Ravinou/dependabot/npm_and_yarn/tabler/icons-react-3.3.0
build(deps): bump @tabler/icons-react from 3.1.0 to 3.3.0
2024-05-09 18:16:40 +02:00
dependabot[bot] 8b3969c26e
build(deps): bump @tabler/icons-react from 3.1.0 to 3.3.0
Bumps [@tabler/icons-react](https://github.com/tabler/tabler-icons/tree/HEAD/packages/icons-react) from 3.1.0 to 3.3.0.
- [Release notes](https://github.com/tabler/tabler-icons/releases)
- [Commits](https://github.com/tabler/tabler-icons/commits/v3.3.0/packages/icons-react)

---
updated-dependencies:
- dependency-name: "@tabler/icons-react"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-30 19:51:58 +00:00
dependabot[bot] e824bc815e
build(deps-dev): bump eslint-config-next from 14.1.4 to 14.2.3
Bumps [eslint-config-next](https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next) from 14.1.4 to 14.2.3.
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/commits/v14.2.3/packages/eslint-config-next)

---
updated-dependencies:
- dependency-name: eslint-config-next
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-24 19:38:07 +00:00
Ravinou 938595f86a
2.2.1 2024-04-07 11:43:32 +02:00
Ravinou 26ba1538e9
Merge pull request #188 from Ravinou/dependabot/npm_and_yarn/tabler/icons-react-3.1.0
build(deps): bump @tabler/icons-react from 2.47.0 to 3.1.0
2024-04-07 10:42:36 +02:00
Ravinou 6380e94fb8
Update README.md
Thanks @dhenry123 for sponsoring this project !
2024-04-07 10:16:57 +02:00
dependabot[bot] 02595d6b0d
build(deps): bump @tabler/icons-react from 2.47.0 to 3.1.0
Bumps [@tabler/icons-react](https://github.com/tabler/tabler-icons/tree/HEAD/packages/icons-react) from 2.47.0 to 3.1.0.
- [Release notes](https://github.com/tabler/tabler-icons/releases)
- [Commits](https://github.com/tabler/tabler-icons/commits/v3.1.0/packages/icons-react)

---
updated-dependencies:
- dependency-name: "@tabler/icons-react"
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-01 14:29:19 +00:00
Ravinou 732b9a5bdc
Merge pull request #194 from Ravinou/dependabot/npm_and_yarn/next-14.1.4
build(deps): bump next from 14.1.3 to 14.1.4
2024-04-01 16:28:39 +02:00
Ravinou 59246e7b70
Merge pull request #195 from Ravinou/dependabot/npm_and_yarn/react-hook-form-7.51.2
build(deps): bump react-hook-form from 7.51.1 to 7.51.2
2024-04-01 16:28:06 +02:00
dependabot[bot] 4e462de87a
build(deps): bump react-hook-form from 7.51.1 to 7.51.2
Bumps [react-hook-form](https://github.com/react-hook-form/react-hook-form) from 7.51.1 to 7.51.2.
- [Release notes](https://github.com/react-hook-form/react-hook-form/releases)
- [Changelog](https://github.com/react-hook-form/react-hook-form/blob/master/CHANGELOG.md)
- [Commits](https://github.com/react-hook-form/react-hook-form/compare/v7.51.1...v7.51.2)

---
updated-dependencies:
- dependency-name: react-hook-form
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-27 19:46:01 +00:00
dependabot[bot] 24a917c28b
build(deps): bump next from 14.1.3 to 14.1.4
Bumps [next](https://github.com/vercel/next.js) from 14.1.3 to 14.1.4.
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/compare/v14.1.3...v14.1.4)

---
updated-dependencies:
- dependency-name: next
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-25 20:01:04 +00:00
Ravinou f46cd5f52c
Merge pull request #192 from Ravinou/dependabot/npm_and_yarn/eslint-config-next-14.1.4
build(deps-dev): bump eslint-config-next from 14.1.3 to 14.1.4
2024-03-24 19:48:45 +01:00
Ravinou 0544def9e5
Merge pull request #191 from Ravinou/dependabot/npm_and_yarn/nodemailer-6.9.13
build(deps): bump nodemailer from 6.9.12 to 6.9.13
2024-03-24 19:48:27 +01:00
Ravinou 4c97551ff9
Merge pull request #190 from Ravinou/dependabot/npm_and_yarn/react-hook-form-7.51.1
build(deps): bump react-hook-form from 7.51.0 to 7.51.1
2024-03-24 19:48:11 +01:00
dependabot[bot] 659cfde44d
build(deps-dev): bump eslint-config-next from 14.1.3 to 14.1.4
Bumps [eslint-config-next](https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next) from 14.1.3 to 14.1.4.
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/commits/v14.1.4/packages/eslint-config-next)

---
updated-dependencies:
- dependency-name: eslint-config-next
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-20 19:54:52 +00:00
dependabot[bot] a47f339bf0
build(deps): bump nodemailer from 6.9.12 to 6.9.13
Bumps [nodemailer](https://github.com/nodemailer/nodemailer) from 6.9.12 to 6.9.13.
- [Release notes](https://github.com/nodemailer/nodemailer/releases)
- [Changelog](https://github.com/nodemailer/nodemailer/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodemailer/nodemailer/compare/v6.9.12...v6.9.13)

---
updated-dependencies:
- dependency-name: nodemailer
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-20 19:54:38 +00:00
dependabot[bot] 69789283f6
build(deps): bump react-hook-form from 7.51.0 to 7.51.1
Bumps [react-hook-form](https://github.com/react-hook-form/react-hook-form) from 7.51.0 to 7.51.1.
- [Release notes](https://github.com/react-hook-form/react-hook-form/releases)
- [Changelog](https://github.com/react-hook-form/react-hook-form/blob/master/CHANGELOG.md)
- [Commits](https://github.com/react-hook-form/react-hook-form/compare/v7.51.0...v7.51.1)

---
updated-dependencies:
- dependency-name: react-hook-form
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-18 19:53:11 +00:00
Ravinou 9ae6f21603
Merge pull request #189 from Ravinou/develop
fix: symbolic link
2024-03-17 21:01:48 +01:00
Ravinou 65cfa0f305
fix: follow symbolic link 2024-03-17 20:48:14 +01:00
Ravinou 63bbd5cfe8
Merge pull request #182 from Ravinou/dependabot/npm_and_yarn/nodemailer-6.9.12
build(deps): bump nodemailer from 6.9.11 to 6.9.12
2024-03-17 15:24:13 +01:00
dependabot[bot] 55195469d8
build(deps): bump nodemailer from 6.9.11 to 6.9.12
Bumps [nodemailer](https://github.com/nodemailer/nodemailer) from 6.9.11 to 6.9.12.
- [Release notes](https://github.com/nodemailer/nodemailer/releases)
- [Changelog](https://github.com/nodemailer/nodemailer/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodemailer/nodemailer/compare/v6.9.11...v6.9.12)

---
updated-dependencies:
- dependency-name: nodemailer
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-11 19:07:17 +00:00
Ravinou 891dbb4db5
docker: message to confirm initialization success #155 2024-03-10 10:59:23 +01:00
Ravinou a3275adfd1
Merge pull request #176 from Ravinou/dependabot/npm_and_yarn/next-14.1.3
build(deps): bump next from 14.1.0 to 14.1.3
2024-03-10 10:58:07 +01:00
Ravinou 6030502288
Update README.md 2024-03-09 16:10:43 +01:00
Ravinou a2460e1225
Merge pull request #172 from Ravinou/dependabot/npm_and_yarn/react-hook-form-7.51.0
build(deps): bump react-hook-form from 7.50.1 to 7.51.0
2024-03-09 15:38:00 +01:00
dependabot[bot] e972c6d280
build(deps): bump next from 14.1.0 to 14.1.3
Bumps [next](https://github.com/vercel/next.js) from 14.1.0 to 14.1.3.
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/compare/v14.1.0...v14.1.3)

---
updated-dependencies:
- dependency-name: next
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-09 14:37:25 +00:00
Ravinou b9b6f667f9
Merge pull request #177 from Ravinou/dependabot/npm_and_yarn/next-auth-4.24.7
build(deps): bump next-auth from 4.24.6 to 4.24.7
2024-03-09 15:37:04 +01:00
Ravinou 77960edc2d
Merge pull request #178 from Ravinou/dependabot/npm_and_yarn/eslint-config-next-14.1.3
build(deps-dev): bump eslint-config-next from 14.1.0 to 14.1.3
2024-03-09 15:36:42 +01:00
dependabot[bot] 39abbfc540
build(deps-dev): bump eslint-config-next from 14.1.0 to 14.1.3
Bumps [eslint-config-next](https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next) from 14.1.0 to 14.1.3.
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/commits/v14.1.3/packages/eslint-config-next)

---
updated-dependencies:
- dependency-name: eslint-config-next
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-07 20:03:17 +00:00
dependabot[bot] 986d33308d
build(deps): bump next-auth from 4.24.6 to 4.24.7
Bumps [next-auth](https://github.com/nextauthjs/next-auth) from 4.24.6 to 4.24.7.
- [Release notes](https://github.com/nextauthjs/next-auth/releases)
- [Commits](https://github.com/nextauthjs/next-auth/compare/next-auth@4.24.6...next-auth@4.24.7)

---
updated-dependencies:
- dependency-name: next-auth
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-07 20:03:02 +00:00
dependabot[bot] d9a6b1072c
build(deps): bump react-hook-form from 7.50.1 to 7.51.0
Bumps [react-hook-form](https://github.com/react-hook-form/react-hook-form) from 7.50.1 to 7.51.0.
- [Release notes](https://github.com/react-hook-form/react-hook-form/releases)
- [Changelog](https://github.com/react-hook-form/react-hook-form/blob/master/CHANGELOG.md)
- [Commits](https://github.com/react-hook-form/react-hook-form/compare/v7.50.1...v7.51.0)

---
updated-dependencies:
- dependency-name: react-hook-form
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-04 19:22:07 +00:00
Ravinou 042e1e1eba
Merge pull request #163 from Ravinou/dependabot/npm_and_yarn/eslint-8.57.0
build(deps-dev): bump eslint from 8.56.0 to 8.57.0
2024-03-03 19:38:34 +01:00
Ravinou 11dae87bc1
Merge pull request #166 from Ravinou/dependabot/npm_and_yarn/chart.js-4.4.2
build(deps): bump chart.js from 4.4.1 to 4.4.2
2024-03-03 19:38:18 +01:00
Ravinou 4265a040ec
Merge pull request #169 from Ravinou/dependabot/npm_and_yarn/nodemailer-6.9.11
build(deps): bump nodemailer from 6.9.10 to 6.9.11
2024-03-03 19:37:53 +01:00
dependabot[bot] 00667606d8
build(deps): bump nodemailer from 6.9.10 to 6.9.11
Bumps [nodemailer](https://github.com/nodemailer/nodemailer) from 6.9.10 to 6.9.11.
- [Release notes](https://github.com/nodemailer/nodemailer/releases)
- [Changelog](https://github.com/nodemailer/nodemailer/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodemailer/nodemailer/compare/v6.9.10...v6.9.11)

---
updated-dependencies:
- dependency-name: nodemailer
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-29 19:54:59 +00:00
dependabot[bot] 712a67c555
build(deps): bump chart.js from 4.4.1 to 4.4.2
Bumps [chart.js](https://github.com/chartjs/Chart.js) from 4.4.1 to 4.4.2.
- [Release notes](https://github.com/chartjs/Chart.js/releases)
- [Commits](https://github.com/chartjs/Chart.js/compare/v4.4.1...v4.4.2)

---
updated-dependencies:
- dependency-name: chart.js
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-28 19:49:12 +00:00
dependabot[bot] b9bcde093b
build(deps-dev): bump eslint from 8.56.0 to 8.57.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.56.0 to 8.57.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.56.0...v8.57.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-26 19:36:24 +00:00
Ravinou aa8ada68d9
Merge pull request #161 from Ravinou/develop
v2.2.0
2024-02-25 19:10:16 +01:00
Ravinou 9f42245de1
v2.2.0 2024-02-25 18:52:17 +01:00
Ravinou 904207e48a
feat: add specific logs for success and failed login 2024-02-25 18:20:06 +01:00
Ravinou 204c7fc384
ui: capitalize username's first letter in header 2024-02-25 18:20:06 +01:00
Ravinou e4b8ab2d33
fix: login case insensitive 2024-02-25 18:20:06 +01:00
Ravinou c6f8f3cf7c
fix: space are not allowed on login form 2024-02-25 18:20:06 +01:00
Ravinou 65f3590a5a
feat: provide default sshd_config file for Docker 2024-02-25 18:20:06 +01:00
Ravinou dbbbc08d5a
Merge pull request #159 from Ravinou/dependabot/npm_and_yarn/nodemailer-6.9.10
build(deps): bump nodemailer from 6.9.9 to 6.9.10
2024-02-25 15:35:19 +01:00
dependabot[bot] 1ae58a7299
build(deps): bump nodemailer from 6.9.9 to 6.9.10
Bumps [nodemailer](https://github.com/nodemailer/nodemailer) from 6.9.9 to 6.9.10.
- [Release notes](https://github.com/nodemailer/nodemailer/releases)
- [Changelog](https://github.com/nodemailer/nodemailer/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodemailer/nodemailer/compare/v6.9.9...v6.9.10)

---
updated-dependencies:
- dependency-name: nodemailer
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-22 19:35:43 +00:00
Ravinou b9ef00e6a0
Merge pull request #157 from Ravinou/dependabot/npm_and_yarn/next-auth-4.24.6
build(deps): bump next-auth from 4.24.5 to 4.24.6
2024-02-18 10:23:43 +01:00
Ravinou d6858ddbd8
Merge pull request #158 from Ravinou/dependabot/npm_and_yarn/swr-2.2.5
build(deps): bump swr from 2.2.4 to 2.2.5
2024-02-18 10:23:11 +01:00
dependabot[bot] 318e773df9
build(deps): bump swr from 2.2.4 to 2.2.5
Bumps [swr](https://github.com/vercel/swr) from 2.2.4 to 2.2.5.
- [Release notes](https://github.com/vercel/swr/releases)
- [Commits](https://github.com/vercel/swr/compare/v2.2.4...v2.2.5)

---
updated-dependencies:
- dependency-name: swr
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-16 19:44:18 +00:00
dependabot[bot] c4eb68a160
build(deps): bump next-auth from 4.24.5 to 4.24.6
Bumps [next-auth](https://github.com/nextauthjs/next-auth) from 4.24.5 to 4.24.6.
- [Release notes](https://github.com/nextauthjs/next-auth/releases)
- [Commits](https://github.com/nextauthjs/next-auth/compare/next-auth@4.24.5...next-auth@4.24.6)

---
updated-dependencies:
- dependency-name: next-auth
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-14 19:43:52 +00:00
Ravinou eccddab276
Merge pull request #151 from Ravinou/dependabot/npm_and_yarn/prettier-3.2.5
build(deps-dev): bump prettier from 3.2.4 to 3.2.5
2024-02-09 20:37:40 +01:00
Ravinou 3d1275371d
Merge pull request #153 from Ravinou/dependabot/npm_and_yarn/react-hook-form-7.50.1
build(deps): bump react-hook-form from 7.50.0 to 7.50.1
2024-02-09 20:37:16 +01:00
dependabot[bot] 237b9d31a1
build(deps): bump react-hook-form from 7.50.0 to 7.50.1
Bumps [react-hook-form](https://github.com/react-hook-form/react-hook-form) from 7.50.0 to 7.50.1.
- [Release notes](https://github.com/react-hook-form/react-hook-form/releases)
- [Changelog](https://github.com/react-hook-form/react-hook-form/blob/master/CHANGELOG.md)
- [Commits](https://github.com/react-hook-form/react-hook-form/compare/v7.50.0...v7.50.1)

---
updated-dependencies:
- dependency-name: react-hook-form
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-06 19:49:48 +00:00
dependabot[bot] 5bd3b79040
build(deps-dev): bump prettier from 3.2.4 to 3.2.5
Bumps [prettier](https://github.com/prettier/prettier) from 3.2.4 to 3.2.5.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.2.4...3.2.5)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-05 19:22:51 +00:00
Ravinou 795ce100de
Merge pull request #150 from Ravinou/develop
fix: arm ci/cd build with node20
2024-02-04 14:00:44 +01:00
Ravinou 45b211f397
fix: arm ci/cd build with node20
# linux/arm/v7 arm32 is not supported by node20 https://github.com/nodejs/docker-node/issues/1946
2024-02-04 13:34:40 +01:00
Ravinou 731be37845
Merge pull request #149 from Ravinou/develop
update dependencies
2024-02-03 10:17:53 +01:00
Ravinou bbd51f3c06
fix: use the latest borgbackup stable release in docker #141 2024-02-03 10:14:01 +01:00
Ravinou 660fa112e2
update dependencies 2024-02-03 09:40:11 +01:00
Ravinou 0c5e23b84c
Merge pull request #140 from Ravinou/dependabot/npm_and_yarn/prettier-3.2.4
build(deps-dev): bump prettier from 3.1.1 to 3.2.4
2024-02-03 09:14:57 +01:00
dependabot[bot] bdb5a3e711
build(deps-dev): bump prettier from 3.1.1 to 3.2.4
Bumps [prettier](https://github.com/prettier/prettier) from 3.1.1 to 3.2.4.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.1.1...3.2.4)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-03 07:59:33 +00:00
Ravinou a9c3d59b47
Merge pull request #143 from Ravinou/dependabot/npm_and_yarn/eslint-config-next-14.1.0
build(deps-dev): bump eslint-config-next from 13.5.6 to 14.1.0
2024-02-03 08:58:47 +01:00
Ravinou 643bf012d8
Merge pull request #148 from Ravinou/dependabot/npm_and_yarn/tabler/icons-react-2.47.0
build(deps): bump @tabler/icons-react from 2.45.0 to 2.47.0
2024-02-03 08:57:08 +01:00
dependabot[bot] fc4655a0c3
build(deps): bump @tabler/icons-react from 2.45.0 to 2.47.0
Bumps [@tabler/icons-react](https://github.com/tabler/tabler-icons/tree/HEAD/packages/icons-react) from 2.45.0 to 2.47.0.
- [Release notes](https://github.com/tabler/tabler-icons/releases)
- [Commits](https://github.com/tabler/tabler-icons/commits/v2.47.0/packages/icons-react)

---
updated-dependencies:
- dependency-name: "@tabler/icons-react"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-02 19:33:54 +00:00
dependabot[bot] 8cf753da8f
build(deps-dev): bump eslint-config-next from 13.5.6 to 14.1.0
Bumps [eslint-config-next](https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next) from 13.5.6 to 14.1.0.
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/commits/v14.1.0/packages/eslint-config-next)

---
updated-dependencies:
- dependency-name: eslint-config-next
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-19 19:57:36 +00:00
Ravinou 2900455700
Update README.md
Thank you very much @Magneticdud for sponsoring ❤️
2024-01-14 20:41:29 +01:00
Ravinou b0a6108c93
Merge pull request #132 from Ravinou/dependabot/npm_and_yarn/react-hook-form-7.49.3
build(deps): bump react-hook-form from 7.49.2 to 7.49.3
2024-01-10 20:56:20 +01:00
dependabot[bot] 5c9e5584da
build(deps): bump react-hook-form from 7.49.2 to 7.49.3
Bumps [react-hook-form](https://github.com/react-hook-form/react-hook-form) from 7.49.2 to 7.49.3.
- [Release notes](https://github.com/react-hook-form/react-hook-form/releases)
- [Changelog](https://github.com/react-hook-form/react-hook-form/blob/master/CHANGELOG.md)
- [Commits](https://github.com/react-hook-form/react-hook-form/compare/v7.49.2...v7.49.3)

---
updated-dependencies:
- dependency-name: react-hook-form
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-09 19:11:08 +00:00
Ravinou c3271c33e6
fix: typo for storage unit Go > GB #126 2024-01-07 15:38:11 +01:00
Ravinou 0c7d6f9290
fix: typo on password placeholder #127 2024-01-06 14:51:15 +01:00
Ravinou 22943577fc
Merge pull request #125 from Ravinou/dependabot/npm_and_yarn/tabler/icons-react-2.45.0
build(deps): bump @tabler/icons-react from 2.44.0 to 2.45.0
2024-01-06 14:47:10 +01:00
Ravinou 50277cf657
Merge pull request #123 from Ravinou/dependabot/npm_and_yarn/nodemailer-6.9.8
build(deps): bump nodemailer from 6.9.7 to 6.9.8
2024-01-06 14:46:54 +01:00
dependabot[bot] ba204ebfd7
build(deps): bump @tabler/icons-react from 2.44.0 to 2.45.0
Bumps [@tabler/icons-react](https://github.com/tabler/tabler-icons/tree/HEAD/packages/icons-react) from 2.44.0 to 2.45.0.
- [Release notes](https://github.com/tabler/tabler-icons/releases)
- [Commits](https://github.com/tabler/tabler-icons/commits/v2.45.0/packages/icons-react)

---
updated-dependencies:
- dependency-name: "@tabler/icons-react"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-02 19:29:22 +00:00
dependabot[bot] 331bd34cde
build(deps): bump nodemailer from 6.9.7 to 6.9.8
Bumps [nodemailer](https://github.com/nodemailer/nodemailer) from 6.9.7 to 6.9.8.
- [Release notes](https://github.com/nodemailer/nodemailer/releases)
- [Changelog](https://github.com/nodemailer/nodemailer/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodemailer/nodemailer/compare/v6.9.7...v6.9.8)

---
updated-dependencies:
- dependency-name: nodemailer
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-01 19:51:46 +00:00
30 changed files with 1756 additions and 877 deletions

2
.github/FUNDING.yml vendored
View file

@ -6,7 +6,7 @@ open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
liberapay: R4VEN
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry

View file

@ -25,5 +25,5 @@ jobs:
with:
context: .
push: true
platforms: linux/amd64,linux/arm64,linux/arm/v7
platforms: linux/amd64,linux/arm64 # linux/arm/v7 arm32 is not supported by node20 https://github.com/nodejs/docker-node/issues/1946
tags: borgwarehouse/borgwarehouse:develop

View file

@ -25,5 +25,5 @@ jobs:
with:
context: .
push: true
platforms: linux/amd64,linux/arm64,linux/arm/v7
platforms: linux/amd64,linux/arm64 # linux/arm/v7 arm32 is not supported by node20 https://github.com/nodejs/docker-node/issues/1946
tags: borgwarehouse/borgwarehouse:latest

View file

@ -28,5 +28,5 @@ jobs:
with:
context: .
push: true
platforms: linux/amd64,linux/arm64,linux/arm/v7
platforms: linux/amd64,linux/arm64 # linux/arm/v7 arm32 is not supported by node20 https://github.com/nodejs/docker-node/issues/1946
tags: borgwarehouse/borgwarehouse:${{ steps.get_release_tag.outputs.TAG }}

View file

@ -18,4 +18,4 @@ jobs:
uses: docker/setup-buildx-action@v3
- name: Build Docker Container
run: |
docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t borgwarehouse:pr-${{ github.event.pull_request.number }} .
docker buildx build --platform linux/amd64,linux/arm64 -t borgwarehouse:pr-${{ github.event.pull_request.number }} .

View file

@ -7,6 +7,7 @@ import {
IconChevronDown,
IconChevronUp,
IconBellOff,
IconLockPlus,
} from '@tabler/icons-react';
import timestampConverter from '../../helpers/functions/timestampConverter';
import StorageBar from '../UI/StorageBar/StorageBar';
@ -72,6 +73,16 @@ export default function Repo(props) {
}
};
const appendOnlyModeIndicator = () => {
if (props.appendOnlyMode) {
return (
<div className={classes.appendOnlyModeIcon}>
<IconLockPlus size={16} color='grey' />
</div>
);
}
};
return (
<>
{displayDetails ? (
@ -80,6 +91,7 @@ export default function Repo(props) {
<div className={classes.openFlex}>
<div className={statusIndicator()} />
<div className={classes.alias}>{props.alias}</div>
{appendOnlyModeIndicator()}
{alertIndicator()}
{props.comment && (
<div className={classes.comment}>
@ -116,7 +128,7 @@ export default function Repo(props) {
<tbody>
<tr>
<th>{props.repositoryName}</th>
<th>{props.storageSize}Go</th>
<th>{props.storageSize} GB</th>
<th style={{ padding: '0 4% 0 4%' }}>
<StorageBar
storageUsed={props.storageUsed}
@ -155,6 +167,7 @@ export default function Repo(props) {
<div className={classes.closeFlex}>
<div className={statusIndicator()} />
<div className={classes.alias}>{props.alias}</div>
{appendOnlyModeIndicator()}
{alertIndicator()}
{props.comment && (
<div className={classes.comment}>

View file

@ -157,6 +157,13 @@
margin-left: 10px;
}
.appendOnlyModeIcon {
display: flex;
flex-direction: row;
align-items: center;
margin-left: 10px;
}
/* GENERAL */
.alias {
font-weight: bold;

View file

@ -38,7 +38,7 @@ export default function Nav() {
<div>
<IconUser size={28} />
</div>
<div>
<div className={classes.username}>
{status === 'authenticated' && data.user.name}
</div>
</div>

View file

@ -10,6 +10,10 @@
align-items: center;
}
.username::first-letter {
text-transform: capitalize;
}
.account {
background: none;
border: none;

View file

@ -3,7 +3,7 @@ import classes from './StorageBar.module.css';
export default function StorageBar(props) {
//Var
//storageUsed is in octet, storageSize is in Go. Round to 1 decimal for %.
//storageUsed is in octet, storageSize is in GB. Round to 1 decimal for %.
const storageUsedPercent = (
((props.storageUsed / 1000000) * 100) /
props.storageSize
@ -23,8 +23,8 @@ export default function StorageBar(props) {
</div>
<div className={classes.tooltip}>
{storageUsedPercent}% (
{(props.storageUsed / 1000000).toFixed(1)}Go/
{props.storageSize}Go)
{(props.storageUsed / 1000000).toFixed(1)} GB /{' '}
{props.storageSize} GB)
</div>
</div>
</div>

View file

@ -78,7 +78,7 @@ export default function StorageUsedChartBar() {
datasets: [
{
label: 'Storage used (%)',
//storageUsed is in octet, storageSize is in Go. Round to 1 decimal for %.
//storageUsed is in octet, storageSize is in GB. Round to 1 decimal for %.
data: data.map((repo) =>
(
((repo.storageUsed / 1000000) * 100) /

View file

@ -123,6 +123,7 @@ export default function RepoList() {
sshPublicKey={repo.sshPublicKey}
comment={repo.comment}
lanCommand={repo.lanCommand}
appendOnlyMode={repo.appendOnlyMode}
repoManageEditHandler={() => repoManageEditHandler(repo.id)}
wizardEnv={wizardEnv}
></Repo>

View file

@ -170,6 +170,7 @@ export default function RepoManage(props) {
comment: dataForm.comment,
alert: dataForm.alert.value,
lanCommand: dataForm.lanCommand,
appendOnlyMode: dataForm.appendOnlyMode,
};
//POST API to send new repo
await fetch('/api/repo/add', {
@ -210,6 +211,7 @@ export default function RepoManage(props) {
comment: dataForm.comment,
alert: dataForm.alert.value,
lanCommand: dataForm.lanCommand,
appendOnlyMode: dataForm.appendOnlyMode,
};
await fetch('/api/repo/id/' + router.query.slug + '/edit', {
method: 'PUT',
@ -384,7 +386,7 @@ export default function RepoManage(props) {
</span>
)}
{/* SIZE */}
<label htmlFor='size'>Storage Size (Go)</label>
<label htmlFor='size'>Storage Size (GB)</label>
<input
type='number'
min='1'
@ -426,7 +428,7 @@ export default function RepoManage(props) {
</span>
)}
{/* LAN COMMAND GENERATION */}
<div className={classes.lanCommandWrapper}>
<div className={classes.optionCommandWrapper}>
<input
type='checkbox'
name='lanCommand'
@ -455,6 +457,36 @@ export default function RepoManage(props) {
/>
</Link>
</div>
{/* APPEND-ONLY MODE */}
<div className={classes.optionCommandWrapper}>
<input
type='checkbox'
name='appendOnlyMode'
defaultChecked={
props.mode == 'edit'
? targetRepo.appendOnlyMode
: false
}
{...register('appendOnlyMode')}
/>
<label htmlFor='appendOnlyMode'>
Enable append-only mode.
</label>
<Link
style={{
alignSelf: 'baseline',
marginLeft: '5px',
}}
href='https://borgwarehouse.com/docs/user-manual/repositories/#append-only-mode'
rel='noreferrer'
target='_blank'
>
<IconExternalLink
size={16}
color='#6c737f'
/>
</Link>
</div>
{/* ALERT */}
<label
style={{ margin: '25px auto 10px auto' }}

View file

@ -126,23 +126,23 @@
margin-top: 3px;
}
.lanCommandWrapper {
.optionCommandWrapper {
display: flex;
margin-top: 20px;
color: #494b7a;
}
.lanCommandWrapper label {
.optionCommandWrapper label {
margin: 0;
}
.lanCommandWrapper input[type='checkbox'] {
.optionCommandWrapper input[type='checkbox'] {
width: auto;
margin-right: 8px;
cursor: pointer;
accent-color: #6d4aff;
}
.lanCommandWrapper input[type='checkbox']:focus {
.optionCommandWrapper input[type='checkbox']:focus {
outline: 0;
box-shadow: none;
accent-color: #6d4aff;

View file

@ -86,7 +86,7 @@ export default function PasswordSettings(props) {
<p>
<input
type='password'
placeholder='Actual password'
placeholder='Current password'
{...register('oldPassword', {
required: true,
})}

View file

@ -29,14 +29,14 @@ FROM base AS runner
ENV NODE_ENV production
RUN echo 'deb http://deb.debian.org/debian bookworm-backports main' >> /etc/apt/sources.list
RUN apt-get update && apt-get install -y \
supervisor \
curl jq jc borgbackup openssh-server sudo cron rsyslog && \
supervisor curl jq jc borgbackup/bookworm-backports openssh-server rsyslog && \
apt-get clean && rm -rf /var/lib/apt/lists/*
RUN groupadd -g ${GID} borgwarehouse && useradd -m -u ${UID} -g ${GID} borgwarehouse
RUN cp /etc/ssh/sshd_config /etc/ssh/moduli /home/borgwarehouse/
RUN cp /etc/ssh/moduli /home/borgwarehouse/
WORKDIR /home/borgwarehouse/app
@ -47,6 +47,7 @@ COPY --from=builder --chown=borgwarehouse:borgwarehouse /app/public ./public
COPY --from=builder --chown=borgwarehouse:borgwarehouse /app/.next/static ./.next/static
COPY --from=builder --chown=borgwarehouse:borgwarehouse /app/docker/supervisord.conf ./
COPY --from=builder --chown=borgwarehouse:borgwarehouse /app/docker/rsyslog.conf /etc/rsyslog.conf
COPY --from=builder --chown=borgwarehouse:borgwarehouse /app/docker/sshd_config ./
USER borgwarehouse

View file

@ -25,6 +25,11 @@
</div>
## ⭐ Support the Project
<div align="center">
<a href="https://github.com/sponsors/Ravinou"><img alt="GitHub Sponsors" src="https://img.shields.io/github/sponsors/Ravinou?style=for-the-badge&logo=github&label=Github%20Sponsors&link=https%3A%2F%2Fgithub.com%2Fsponsors%2FRavinou"></a>
<a href="https://liberapay.com/R4VEN/"><img alt="Liberapay patrons" src="https://img.shields.io/liberapay/patrons/R4VEN?style=for-the-badge&logo=liberapay&label=Liberapay%20Sponsors&link=https%3A%2F%2Fliberapay.com%2FR4VEN"></a>
</div>
If you find BorgWarehouse helpful or interesting, please consider **giving it a star on GitHub** and **[sponsoring](https://github.com/sponsors/Ravinou)**. Your support is greatly appreciated!
@ -65,7 +70,13 @@ Check the online documentation [just here](https://borgwarehouse.com/docs/admin-
## ❤️ Special thanks to sponsors ❤️
<a href="https://github.com/shad-lp"><img src="https://avatars.githubusercontent.com/shad-lp" style="width:50px; border-radius:50%;"/></a>
### 🥇 Current sponsors 🥇
<a href="https://github.com/royalmoose"><img src="https://avatars.githubusercontent.com/royalmoose" style="width:50px; border-radius:50%;"/></a>
<a href="https://github.com/Magneticdud"><img src="https://avatars.githubusercontent.com/Magneticdud" style="width:50px; border-radius:50%;"/></a>
<a href="https://github.com/dhenry123"><img src="https://avatars.githubusercontent.com/dhenry123" style="width:50px; border-radius:50%;"/></a>
#### Past sponsors
<a href="https://github.com/shad-lp"><img src="https://avatars.githubusercontent.com/shad-lp" style="width:25px; border-radius:50%;"/></a>
[next.js]: https://img.shields.io/badge/next.js-000000?style=for-the-badge&logo=nextdotjs&logoColor=white
[next-url]: https://nextjs.org/

View file

@ -17,7 +17,11 @@ init_ssh_server() {
if [ -z "$(ls -A /etc/ssh)" ]; then
print_green "/etc/ssh is empty, generating SSH host keys..."
ssh-keygen -A
cp /home/borgwarehouse/sshd_config /home/borgwarehouse/moduli /etc/ssh/
cp /home/borgwarehouse/moduli /etc/ssh/
fi
if [ ! -f "/etc/ssh/sshd_config" ]; then
print_green "sshd_config not found in your volume, copying the default one..."
cp /home/borgwarehouse/app/sshd_config /etc/ssh/
fi
}
@ -78,4 +82,5 @@ create_authorized_keys_file
check_repos_directory
get_SSH_fingerprints
exec supervisord -c /home/borgwarehouse/app/supervisord.conf
print_green "Successful initialization. BorgWarehouse is ready !"
exec supervisord -c /home/borgwarehouse/app/supervisord.conf

32
docker/sshd_config Normal file
View file

@ -0,0 +1,32 @@
Port 22
PidFile /home/borgwarehouse/tmp/sshd.pid
AllowUsers borgwarehouse
LogLevel INFO
SyslogFacility AUTH
# Security
Protocol 2
PermitRootLogin no
PasswordAuthentication no
ChallengeResponseAuthentication no
AuthenticationMethods publickey
MaxAuthTries 2
MaxStartups 2:30:10
LoginGraceTime 30
UsePAM no
# Useless options for BorgWarehouse
PrintMotd no
UseDNS no
AllowTcpForwarding no
X11Forwarding no
PermitTTY no
# Ciphers
Ciphers aes256-ctr,aes192-ctr,aes128-ctr
MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com
# With low bandwidth or huge backup, uncomment the following lines to avoid SSH timeout (Broken pipe).
#ClientAliveInterval 600
#ClientAliveCountMax 0

View file

@ -7,7 +7,7 @@ logfile_maxbytes=10MB
logfile_backups=5
[program:sshd]
command=/usr/sbin/sshd -D -e -o PidFile=/home/borgwarehouse/tmp/sshd.pid -o SyslogFacility=AUTH -o LogLevel=INFO -o PasswordAuthentication=no -o ChallengeResponseAuthentication=no -o UsePAM=no -o PermitRootLogin=no
command=/usr/sbin/sshd -D -e -f /etc/ssh/sshd_config
stdout_logfile=/home/borgwarehouse/tmp/sshd.log
stdout_logfile_maxbytes=10MB
stdout_logfile_backups=5

View file

@ -1,7 +1,7 @@
#!/usr/bin/env bash
# Shell created by Raven for BorgWarehouse.
# This shell takes 2 arguments : [SSH pub key] X [quota]
# This shell takes 2 arguments : [SSH pub key] X [quota] x [append only mode (boolean)]
# Main steps are :
# - check if args are present
# - check the ssh pub key format
@ -31,8 +31,8 @@ pool="${home}/repos"
authorized_keys="${home}/.ssh/authorized_keys"
# Check args
if [ "$1" == "" ] || [ "$2" == "" ];then
echo -n "This shell takes 2 arguments : SSH Public Key, Quota in Go [e.g. : 10] "
if [ "$1" == "" ] || [ "$2" == "" ] || [ "$3" != "true" ] && [ "$3" != "false" ];then
echo -n "This shell takes 3 arguments : SSH Public Key, Quota in Go [e.g. : 10], Append only mode [true|false]"
exit 1
fi
@ -45,6 +45,12 @@ then
exit 2
fi
## Check if authorized_keys exists
if [ ! -f "${authorized_keys}" ];then
echo -n "${authorized_keys} must be present"
exit 5
fi
# Check if SSH pub key is already present in authorized_keys
if grep -q "$1" "$authorized_keys"; then
echo -n "SSH pub key already present in authorized_keys"
@ -63,14 +69,15 @@ randRepositoryName () {
}
repositoryName=$(randRepositoryName)
## Check if authorized_keys exists
if [ ! -f "${authorized_keys}" ];then
echo -n "${authorized_keys} must be present"
exit 5
# Append only mode
if [ "$3" == "true" ]; then
appendOnlyMode=" --append-only"
else
appendOnlyMode=""
fi
## Add ssh public key in authorized_keys with borg restriction for only 1 repository and storage quota
restricted_authkeys="command=\"cd ${pool};borg serve --restrict-to-path ${pool}/${repositoryName} --storage-quota $2G\",restrict $1"
restricted_authkeys="command=\"cd ${pool};borg serve${appendOnlyMode} --restrict-to-path ${pool}/${repositoryName} --storage-quota $2G\",restrict $1"
echo "$restricted_authkeys" | tee -a "${authorized_keys}" >/dev/null
## Return the repositoryName

View file

@ -26,7 +26,7 @@ fi
# Default value if .env not exists
: "${home:=/home/borgwarehouse}"
if [ -n "$(find "${home}"/repos -mindepth 1 -maxdepth 1 -type d)" ]; then
if [ -n "$(find -L "${home}"/repos -mindepth 1 -maxdepth 1 -type d)" ]; then
stat --format='{"repositoryName":"%n","lastSave":%Y}' \
"${home}"/repos/*/integrity* |
jq --slurp '[.[] | .repositoryName = (.repositoryName | split("/")[-2])]'

View file

@ -1,7 +1,7 @@
#!/usr/bin/env bash
# Shell created by Raven for BorgWarehouse.
# This shell takes 3 args: [repositoryName] [new SSH pub key] [quota]
# This shell takes 4 args: [repositoryName] [new SSH pub key] [quota] [append-only mode (boolean)]
# This shell updates the SSH key and the quota for a repository.
# Exit when any command fails
@ -16,8 +16,8 @@ fi
: "${home:=/home/borgwarehouse}"
# Check args
if [ "$1" == "" ] || [ "$2" == "" ] || [ "$3" == "" ]; then
echo -n "This shell takes 3 args: [repositoryName] [new SSH pub key] [quota]"
if [ "$1" == "" ] || [ "$2" == "" ] || [ "$3" == "" ] || [ "$4" != "true" ] && [ "$4" != "false" ]; then
echo -n "This shell takes 4 args: [repositoryName] [new SSH pub key] [quota] [Append only mode [true|false]]"
exit 1
fi
@ -68,5 +68,12 @@ if [ "$found" = true ]; then
exit 5
fi
# Append only mode
if [ "$4" == "true" ]; then
sed -ri "/command=\".*${repositoryName}.*\",restrict/ {/borg serve .*--append-only /! s|(borg serve )|\1--append-only |}" "$home/.ssh/authorized_keys"
elif [ "$4" == "false" ]; then
sed -ri "/command=\".*${repositoryName}.*\",restrict/ s|(--append-only )||g" "$home/.ssh/authorized_keys"
fi
# Modify authorized_keys for the repositoryName: update the line with the quota and the SSH pub key
sed -ri "s|(command=\".*${repositoryName}.*--storage-quota ).*G\",restrict .*|\\1$3G\",restrict $2|g" "$home/.ssh/authorized_keys"
sed -ri "s|(command=\".*${repositoryName}.*--storage-quota ).*G\",restrict .*|\\1$3G\",restrict $2|g" "$home/.ssh/authorized_keys"

2296
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
{
"name": "borgwarehouse",
"version": "2.1.0",
"version": "2.3.0",
"private": true,
"scripts": {
"dev": "next dev",
@ -9,24 +9,23 @@
"lint": "next lint"
},
"dependencies": {
"@tabler/icons-react": "^2.44.0",
"@tabler/icons-react": "^3.5.0",
"bcryptjs": "^2.4.3",
"chart.js": "^4.4.1",
"next": "^13.5.6",
"next-auth": "^4.24.5",
"nodemailer": "^6.9.7",
"react": "^18.2.0",
"chart.js": "^4.4.3",
"next": "^14.2.3",
"next-auth": "^4.24.7",
"nodemailer": "^6.9.13",
"react": "^18.3.1",
"react-chartjs-2": "^5.2.0",
"react-dom": "^18.2.0",
"react-hook-form": "^7.49.2",
"react-dom": "^18.3.1",
"react-hook-form": "^7.51.5",
"react-select": "^5.8.0",
"react-toastify": "^9.0.8",
"react-toastify": "^10.0.5",
"spinners-react": "^1.0.7",
"swr": "^2.2.0"
"swr": "^2.2.5"
},
"devDependencies": {
"eslint": "8.56.0",
"eslint-config-next": "^13.5.6",
"prettier": "^3.1.1"
"eslint-config-next": "^14.2.3",
"prettier": "^3.2.5"
}
}

View file

@ -20,7 +20,7 @@ export default function MyApp({ Component, pageProps }) {
<link rel='shortcut icon' href='/favicon.ico' />
<title>BorgWarehouse</title>
</Head>
<ToastContainer />
<ToastContainer stacked />
<Component {...pageProps} />
</Layout>
</SessionProvider>

View file

@ -5,11 +5,20 @@ import { verifyPassword } from '../../../helpers/functions/auth';
import fs from 'fs';
import path from 'path';
const logLogin = async (message, req, success = false) => {
const ipAddress = req.headers['x-forwarded-for'] || 'unknown';
if (success) {
console.log(`Login success from ${ipAddress} with user ${message}`);
} else {
console.log(`Login failed from ${ipAddress} : ${message}`);
}
};
////Use if need getServerSideProps and therefore getServerSession
export const authOptions = {
providers: [
CredentialsProvider({
async authorize(credentials) {
async authorize(credentials, req) {
const { username, password } = credentials;
//Read the users file
//Find the absolute path of the json directory
@ -42,8 +51,9 @@ export const authOptions = {
//Step 1 : does the user exist ?
const userIndex = usersList
.map((user) => user.username)
.indexOf(username);
.indexOf(username.toLowerCase());
if (userIndex === -1) {
await logLogin(`Bad username ${req.body.username}`, req);
throw new Error('Incorrect credentials.');
}
const user = usersList[userIndex];
@ -51,6 +61,10 @@ export const authOptions = {
//Step 2 : Is the password correct ?
const isValid = await verifyPassword(password, user.password);
if (!isValid) {
await logLogin(
`Wrong password for ${req.body.username}`,
req
);
throw new Error('Incorrect credentials.');
}
@ -62,6 +76,7 @@ export const authOptions = {
roles: user.roles,
};
await logLogin(req.body.username, req, true);
return account;
},
}),

View file

@ -16,10 +16,23 @@ export default async function handler(req, res) {
}
//The data we expect to receive
const { alias, sshPublicKey, size, comment, alert, lanCommand } =
req.body;
const {
alias,
sshPublicKey,
size,
comment,
alert,
lanCommand,
appendOnlyMode,
} = req.body;
//We check that we receive data for each variable. Only "comment" and "lanCommand" are optional in the form.
if (!alias || !sshPublicKey || !size || (!alert && alert !== 0)) {
if (
!alias ||
!sshPublicKey ||
!size ||
typeof appendOnlyMode !== 'boolean' ||
(!alert && alert !== 0)
) {
//If a variable is empty.
res.status(422).json({
message: 'Unexpected data',
@ -60,6 +73,7 @@ export default async function handler(req, res) {
comment: comment,
displayDetails: true,
lanCommand: lanCommand,
appendOnlyMode: appendOnlyMode,
};
////Call the shell : createRepo.sh
@ -67,7 +81,7 @@ export default async function handler(req, res) {
const shellsDirectory = path.join(process.cwd(), '/helpers');
//Exec the shell
const { stdout } = await exec(
`${shellsDirectory}/shells/createRepo.sh "${newRepo.sshPublicKey}" ${newRepo.storageSize}`
`${shellsDirectory}/shells/createRepo.sh "${newRepo.sshPublicKey}" ${newRepo.storageSize} ${newRepo.appendOnlyMode}`
);
newRepo.repositoryName = stdout.trim();

View file

@ -16,15 +16,26 @@ export default async function handler(req, res) {
}
//The data we expect to receive
const { alias, sshPublicKey, size, comment, alert, lanCommand } =
req.body;
//We check that we receive data for each variable. Only "comment" and "lanCommand" are optional in the form.
if (!alias || !sshPublicKey || !size || (!alert && alert !== 0)) {
//If a variable is empty.
const {
alias,
sshPublicKey,
size,
comment,
alert,
lanCommand,
appendOnlyMode,
} = req.body;
//Only "comment" and "lanCommand" are optional in the form.
if (
!alias ||
!sshPublicKey ||
!size ||
typeof appendOnlyMode !== 'boolean' ||
(!alert && alert !== 0)
) {
res.status(422).json({
message: 'Unexpected data',
});
//A return to make sure we don't go any further if data are incorrect.
return;
}
@ -49,7 +60,7 @@ export default async function handler(req, res) {
const shellsDirectory = path.join(process.cwd(), '/helpers');
// //Exec the shell
await exec(
`${shellsDirectory}/shells/updateRepo.sh ${repoList[repoIndex].repositoryName} "${sshPublicKey}" ${size}`
`${shellsDirectory}/shells/updateRepo.sh ${repoList[repoIndex].repositoryName} "${sshPublicKey}" ${size} ${appendOnlyMode}`
);
//Find the ID in the data and change the values transmitted by the form
@ -63,6 +74,7 @@ export default async function handler(req, res) {
comment: comment,
alert: alert,
lanCommand: lanCommand,
appendOnlyMode: appendOnlyMode,
}
: repo
);

View file

@ -99,33 +99,24 @@ export default function Login() {
placeholder='Username'
className='signInInput'
{...register('username', {
required: true,
required: 'This field is required.',
pattern: {
value: /^[^\s]+$/g,
message: 'No space allowed.',
},
})}
/>
{errors.email &&
errors.email.type === 'required' && (
<small
style={{
color: 'red',
display: 'block',
marginTop: '3px',
}}
>
This field is required.
</small>
)}
{errors.email &&
errors.email.type === 'pattern' && (
<small
style={{
color: 'red',
display: 'block',
marginTop: '3px',
}}
>
Incorrect email address format.
</small>
)}
{errors.username && (
<small
style={{
color: 'red',
display: 'block',
marginTop: '3px',
}}
>
{errors.username.message}
</small>
)}
</p>
<p>
<input
@ -133,7 +124,7 @@ export default function Login() {
placeholder='Password'
className='signInInput'
{...register('password', {
required: true,
required: 'This field is required.',
})}
/>
{errors.password && (
@ -144,7 +135,7 @@ export default function Login() {
marginTop: '3px',
}}
>
This field is required.
{errors.password.message}
</small>
)}
</p>