diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index ec9654b3b..948fb90a6 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -54,86 +54,86 @@ jobs:
mode: restore
- run: npm run test -w=@getodk/central-frontend
- test-forms-app:
- name: 'Test forms app'
- needs:
- - check-and-build
- timeout-minutes: 2
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v6
- - uses: ./.github/actions/node-cache
- with:
- mode: restore
- - run: npx playwright install chromium --with-deps
- - run: npm run test -w=@getodk/forms
+ #test-forms-app:
+ # name: 'Test forms app'
+ # needs:
+ # - check-and-build
+ # timeout-minutes: 2
+ # runs-on: ubuntu-latest
+ # steps:
+ # - uses: actions/checkout@v6
+ # - uses: ./.github/actions/node-cache
+ # with:
+ # mode: restore
+ # - run: npx playwright install chromium --with-deps
+ # - run: npm run test -w=@getodk/forms
- e2e-tests:
- name: 'Test apps e2e'
- needs:
- - test-central-app
- - test-forms-app
- timeout-minutes: 20
- runs-on: ubuntu-latest
- steps:
+ #e2e-tests:
+ # name: 'Test apps e2e'
+ # needs:
+ # - test-central-app
+ # - test-forms-app
+ # timeout-minutes: 20
+ # runs-on: ubuntu-latest
+ # steps:
- # This one weird trick speeds up every build!
- # see: https://github.com/getodk/central-backend/pull/1642
- # see: https://github.com/actions/runner/issues/4030
- - run: sudo apt-get remove --purge man-db
- - uses: actions/checkout@v6
- with:
- path: client
- fetch-depth: 0
- - name: Clone getodk/central repo
- run: |
- git clone -b next https://github.com/getodk/central.git
- cd central
- git submodule set-branch -b master server
- git submodule update --init --remote server
- mv ../client .
- - name: Modify files
- working-directory: central
- run: |
- yq e '.services.enketo.extra_hosts += ["${DOMAIN}:host-gateway"]' -i docker-compose.yml
- sed -i 's|\${BASE_URL}|http://${DOMAIN}|g' files/enketo/config.json.template
- sed -i 's|\${BASE_URL}|http://${DOMAIN}|g' files/service/config.json.template
- sed -i 's/\$scheme/https/g' files/nginx/odk.conf.template
- sed -Ei 's/https:([ ;]|$)/http:\1/g' files/nginx/odk.conf.template
- sed 's/your.domain.com/central-test.localhost/; s/^SSL_TYPE=letsencrypt/SSL_TYPE=upstream/' .env.template > .env
- - name: Add domain
- run: echo '127.0.0.1 central-test.localhost' | sudo tee --append /etc/hosts
- - name: Start services
- working-directory: central
- run: touch ./files/allow-postgres14-upgrade && docker compose build --build-arg FRONTEND_BUILD_MODE=source && docker compose up -d
- - name: Set node version
- uses: actions/setup-node@v6
- with:
- node-version-file: central/client/package.json
- cache: 'npm'
- cache-dependency-path: 'central/client/package-lock.json'
- - name: Run tests
- working-directory: central
- run: client/e2e-tests/run-tests.sh --domain=central-test.localhost --port=80
- - name: Archive playwright result
- if: failure()
- uses: actions/upload-artifact@v7
- with:
- name: Playwright Artifacts
- path: central/client/test-results
- - if: always()
- name: Docker Container Logs
- working-directory: central
- run: docker compose logs || true
+ # # This one weird trick speeds up every build!
+ # # see: https://github.com/getodk/central-backend/pull/1642
+ # # see: https://github.com/actions/runner/issues/4030
+ # - run: sudo apt-get remove --purge man-db
+ # - uses: actions/checkout@v6
+ # with:
+ # path: client
+ # fetch-depth: 0
+ # - name: Clone getodk/central repo
+ # run: |
+ # git clone -b next https://github.com/getodk/central.git
+ # cd central
+ # git submodule set-branch -b master server
+ # git submodule update --init --remote server
+ # mv ../client .
+ # - name: Modify files
+ # working-directory: central
+ # run: |
+ # yq e '.services.enketo.extra_hosts += ["${DOMAIN}:host-gateway"]' -i docker-compose.yml
+ # sed -i 's|\${BASE_URL}|http://${DOMAIN}|g' files/enketo/config.json.template
+ # sed -i 's|\${BASE_URL}|http://${DOMAIN}|g' files/service/config.json.template
+ # sed -i 's/\$scheme/https/g' files/nginx/odk.conf.template
+ # sed -Ei 's/https:([ ;]|$)/http:\1/g' files/nginx/odk.conf.template
+ # sed 's/your.domain.com/central-test.localhost/; s/^SSL_TYPE=letsencrypt/SSL_TYPE=upstream/' .env.template > .env
+ # - name: Add domain
+ # run: echo '127.0.0.1 central-test.localhost' | sudo tee --append /etc/hosts
+ # - name: Start services
+ # working-directory: central
+ # run: touch ./files/allow-postgres14-upgrade && docker compose build --build-arg FRONTEND_BUILD_MODE=source && docker compose up -d
+ # - name: Set node version
+ # uses: actions/setup-node@v6
+ # with:
+ # node-version-file: central/client/package.json
+ # cache: 'npm'
+ # cache-dependency-path: 'central/client/package-lock.json'
+ # - name: Run tests
+ # working-directory: central
+ # run: client/e2e-tests/run-tests.sh --domain=central-test.localhost --port=80
+ # - name: Archive playwright result
+ # if: failure()
+ # uses: actions/upload-artifact@v7
+ # with:
+ # name: Playwright Artifacts
+ # path: central/client/test-results
+ # - if: always()
+ # name: Docker Container Logs
+ # working-directory: central
+ # run: docker compose logs || true
- wf-tests:
- name: 'Test web-forms packages'
- needs:
- - check-and-build
- uses: ./.github/workflows/wf-ci.yml
+ #wf-tests:
+ # name: 'Test web-forms packages'
+ # needs:
+ # - check-and-build
+ # uses: ./.github/workflows/wf-ci.yml
- wf-e2e-tests:
- name: 'Test web-forms e2e'
- needs:
- - wf-tests
- uses: ./.github/workflows/wf-ci-e2e.yml
+ #wf-e2e-tests:
+ # name: 'Test web-forms e2e'
+ # needs:
+ # - wf-tests
+ # uses: ./.github/workflows/wf-ci-e2e.yml
diff --git a/apps/central/src/components/form-group.vue b/apps/central/src/components/form-group.vue
index 050eae740..a76da2a93 100644
--- a/apps/central/src/components/form-group.vue
+++ b/apps/central/src/components/form-group.vue
@@ -15,9 +15,9 @@ except according to the terms contained in the LICENSE file.
+ {{ requiredLabel(placeholder, required) }}
{{ $t('oidcBody') }}
{{ $t('cannotChange') }}
@@ -46,6 +63,7 @@ import useRequest from '../../../composables/request'; import { apiPaths } from '../../../util/request'; import { noop } from '../../../util/util'; import { useRequestData } from '../../../request-data'; +import { checkPasswordPwnage } from '../../../util/password'; export default { name: 'UserEditPassword', @@ -62,13 +80,21 @@ export default { newPassword: '', tooShort: false, confirm: '', - mismatch: false + mismatch: false, + pwned: false, + submitInProgress: false, }; }, + watch: { + newPassword() { + this.pwned = false; + }, + }, methods: { validate() { this.tooShort = false; this.mismatch = false; + this.pwned = false; if (this.newPassword.length < 10) { this.alert.danger(this.$t('alert.passwordTooShort')); @@ -86,26 +112,53 @@ export default { }, submit() { if (!this.validate()) return; - const data = { old: this.oldPassword, new: this.newPassword }; - this.request({ - method: 'PUT', - url: apiPaths.password(this.user.id), - data - }) - .then(() => { - this.alert.success(this.$t('alert.success')); - // The Chrome password manager does not realize that the form was - // submitted. Should we navigate to a different page so that it does? + this.submitInProgress = true; + + checkPasswordPwnage(this.request, this.newPassword) + .then(isPwned => { + if (isPwned) { + this.pwned = true; + return; + } + + const data = { old: this.oldPassword, new: this.newPassword }; + this.request({ + method: 'PUT', + url: apiPaths.password(this.user.id), + data + }) + .then(() => { + this.alert.success(this.$t('alert.success')); + + // The Chrome password manager does not realize that the form was + // submitted. Should we navigate to a different page so that it does? + }); }) - .catch(noop); + .catch(noop) + .finally(() => { + this.submitInProgress = false; + }); } } };