Skip to content

Commit

Permalink
Don't show no-auth when WebAuthn credentials are enrolled
Browse files Browse the repository at this point in the history
  • Loading branch information
emlun committed Oct 15, 2023
1 parent 530cb4a commit 42fc63b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions gui/default/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,9 @@ <h3 class="panel-title">
</div>
<div class="panel-body">
<p>
<span translate>The Syncthing admin interface is configured to allow remote access without a password.</span>
<span translate>The Syncthing admin interface is configured to allow remote access without authentication.</span>
<b><span translate>This can easily give hackers access to read and change any files on your computer.</span></b>
<span translate>Please set a GUI Authentication User and Password in the Settings dialog.</span>
<span translate>Please set a GUI Authentication User and Password in the Settings dialog, or enroll a WebAuthn credential.</span>
</p>
</div>
<div class="panel-footer">
Expand Down
5 changes: 4 additions & 1 deletion gui/default/syncthing/core/syncthingController.js
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,10 @@ angular.module('syncthing.core')
// This function should match IsAuthEnabled() in guiconfiguration.go
var guiCfg = $scope.config && $scope.config.gui;
if (guiCfg) {
return guiCfg.authMode === 'ldap' || (guiCfg.user && guiCfg.password);
return (guiCfg.authMode === 'ldap'
|| (guiCfg.user && guiCfg.password)
|| (guiCfg.webauthnCredentials || []).length > 0
);
}
return false;
};
Expand Down

0 comments on commit 42fc63b

Please sign in to comment.