Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions images/chromium-headful/client/src/components/connect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,13 @@
displayname = this.$accessor.displayname || usr
}

// KERNEL: auto-login
this.$accessor.login({ displayname: 'kernel', password: 'admin' })
// KERNEL: auto-login, but respect caller-supplied credentials first.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

URL usr param ignored when persisted displayname exists

High Severity

The pwd and usr URL parameters are handled inconsistently. For pwd, the URL param unconditionally overrides the persisted this.$accessor.password. But for usr, line 102 does displayname = this.$accessor.displayname || usr, meaning the persisted displayname takes precedence and the URL usr value is silently discarded. Before this PR the inconsistency was harmless because both values were thrown away. Now that the login call actually uses them, a credential-bearing embed link like ?usr=bob&pwd=secret will authenticate with the correct password but the wrong username whenever a persisted displayname exists.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 1b7411d. Configure here.

// This keeps the legacy fallback for existing deployments while allowing
// embeds and links that provide explicit credentials to work as intended.
this.$accessor.login({
displayname: displayname || 'kernel',
password: password || 'admin',
})
this.autoPassword = null
}

Expand Down