🧪 Test Hub
testing: Demo target v3.0.0 · built-in demo site
← →

Run #345 — DEMO-023

failed
📄 Download report

queued 2026-09-24 20:41:04 · started 20:41:06 · finished 20:41:15 · duration 9s · target v2.1.0 · chromium · trigger: cli-adopted · batch: 3 tests (terminal)

What went wrong

AssertionError: the reset link worked a SECOND time: any old reset email is still a key to the account -- a reset link must stop working once it has been used
Technical details (full error)
AssertionError: the reset link worked a SECOND time: any old reset email is still a key to the account -- a reset link must stop working once it has been used
Traceback (most recent call last):
  File "/opt/pw-testhub/app/core/harness/run_test.py", line 737, in main
    module.run(TimedPage(page, ctx), ctx)
  File "/opt/pw-testhub/data/tests/DEMO-023__freight_password_reset_email.py", line 65, in run
    assert page.locator("#reset-form").count() == 0, (
AssertionError: the reset link worked a SECOND time: any old reset email is still a key to the account -- a reset link must stop working once it has been used
the page at the moment of failure
the page at the moment it failed

Activity replay 7 frames, captured only while the page was actually changing — idle waits are skipped automatically

activity frame
+0.00s

Step timings follows the replay — click a step to see it there

atsteptook
+0.71s goto http://127.0.0.1:8000/demo/freight/login/ 165 ms
+0.88s click #forgot-link 227 ms
+1.11s fill #forgot-login 108 ms
+1.22s click #forgot-btn 150 ms
+1.37s inner_text #forgot-ref 48 ms
+1.42s goto http://127.0.0.1:8000/demo/freight/mailbox/?to=driver@acme-freight.example 92 ms
+1.42s ⏱ wait for the email 4.57 s
+1.51s wait_for_selector #mail-list a.mail-subject:has-text('ref 1DEC50') 4.48 s
+5.99s click #mail-list a.mail-subject:has-text('ref 1DEC50') 94 ms
+6.08s wait_for_selector #mail-body a[href*='/login/reset/'] 69 ms
+6.27s click #mail-body a[href*='/login/reset/'] 100 ms
+6.27s ⏱ choose a new password 497 ms
+6.37s fill #new-password 56 ms
+6.43s fill #confirm-password 69 ms
+6.50s click #reset-btn 162 ms
+6.66s wait_for_selector #login-btn 110 ms
+6.76s fill #username 18 ms
+6.77s ⏱ sign in with the new password 562 ms
+6.78s fill #password 16 ms
+6.80s click #login-btn 375 ms
+7.18s wait_for_selector #signed-in-user 153 ms
+7.33s click #sign-out 174 ms
+7.51s wait_for_selector #login-btn 74 ms
+7.57s ⏱ follow the same link again 437 ms
+7.58s goto http://127.0.0.1:8000/demo/freight/mailbox/4/ 128 ms
+7.70s click #mail-body a[href*='/login/reset/'] 186 ms
+7.89s wait_for_selector #reset-invalid, #reset-form 122 ms

Times are when each step began, on the replay's clock. Add your own phases with with ctx.timed("label"):.

Screenshots

01-the_reset_email.png
01-the_reset_email.png
02-the_same_link_a_second_time.png
02-the_same_link_a_second_time.png
state at failure
state at failure

Artifacts

Run logrun.log
Playwright trace trace.zip open with: playwright show-trace trace.zip
Result JSONresult.json
Folderresults/DEMO-023/20260924-204106-r345/

Full log

Read from the S3 bucket (the last 20 KB; the whole file is the Run log link above).

[harness] test=DEMO-023 browser=chromium headed=False timeout=180s
[harness] target: http://127.0.0.1:8000/demo/
[test] [   0.72s] starting DEMO-023
[timing] goto http://127.0.0.1:8000/demo/freight/login/: 165ms
[timing] click #forgot-link: 227ms
[timing] fill #forgot-login: 108ms
[timing] click #forgot-btn: 150ms
[timing] inner_text #forgot-ref: 48ms
[test] [   1.42s] reset requested, reference 1DEC50
[timing] goto http://127.0.0.1:8000/demo/freight/mailbox/?to=driver@acme-freight.example: 92ms
[timing] wait_for_selector #mail-list a.mail-subject:has-text('ref 1DEC50'): 4476ms
[timing] wait for the email: 4568ms
[timing] click #mail-list a.mail-subject:has-text('ref 1DEC50'): 94ms
[timing] wait_for_selector #mail-body a[href*='/login/reset/']: 69ms
[test] [   6.27s] screenshot: 01-the_reset_email.png
[timing] click #mail-body a[href*='/login/reset/']: 100ms
[timing] fill #new-password: 56ms
[timing] fill #confirm-password: 69ms
[timing] click #reset-btn: 162ms
[timing] wait_for_selector #login-btn: 110ms
[timing] choose a new password: 497ms
[timing] fill #username: 18ms
[timing] fill #password: 16ms
[timing] click #login-btn: 375ms
[timing] wait_for_selector #signed-in-user: 153ms
[timing] sign in with the new password: 562ms
[test] [   7.33s] signed in with the new password
[timing] click #sign-out: 174ms
[timing] wait_for_selector #login-btn: 74ms
[timing] goto http://127.0.0.1:8000/demo/freight/mailbox/4/: 128ms
[timing] click #mail-body a[href*='/login/reset/']: 186ms
[timing] wait_for_selector #reset-invalid, #reset-form: 122ms
[timing] follow the same link again: 437ms
[test] [   8.19s] screenshot: 02-the_same_link_a_second_time.png
[test] [   8.20s] FAILED: the reset link worked a SECOND time: any old reset email is still a key to the account -- a reset link must stop working once it has been used
[harness] security: 1 high, 3 medium, 1 low
[harness] saved failure.png
[harness] saved trace.zip
[harness] saved video.webm
[harness] result: failed

Security observations what the browser noticed while this ran — not a penetration test

SeverityFindingWhat to do
high The page requested resources from other hosts
Requests went to: analytics.acme-metrics.invalid (12). On an air-gapped network these cannot succeed -- so the page is either broken or waiting on a timeout -- and each one is a path by which data could leave the enclave.
Vendor the resource locally, or remove the reference. This is worth chasing even when the page still appears to work.
medium The application is served over plain HTTP
http://127.0.0.1:8000/demo/ is not HTTPS, so anything typed into it travels the network in the clear and can be modified in transit.
On an isolated lab network this may be a deliberate choice -- if so, note it and move on. Anywhere else, terminate TLS in front of the application.
medium Missing Content-Security-Policy
Without it, an injected script can run with the page's full privileges. This is the single most effective header against XSS.
Set the Content-Security-Policy response header on the application or its reverse proxy.
medium Missing X-Frame-Options (or CSP frame-ancestors)
Without it, another site can embed this page invisibly and trick a user into clicking things (clickjacking).
Set the X-Frame-Options (or CSP frame-ancestors) response header on the application or its reverse proxy.
low Response advertises software version (server)
server: pw-testhub -- this tells an attacker exactly what to look up known vulnerabilities for.
Suppress or blank the server header at the proxy.
info Cookie 'csrftoken' is readable by JavaScript (expected)
This looks like a CSRF token, which the page's own JavaScript has to read in order to send it back. HttpOnly would break that. Nothing to do -- listed so you know it was checked and not missed.
No action. Do check that SESSION cookies are HttpOnly.

All of these appear together on the Security page.