forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
server/ui: move UI endpoint registration below SQL initialization
HTTP requests are passed through an authentication mux, which checks that the user is authenticated based on the cookies on the request. To check authentication, the mux runs SQL to look up a session in the system.web_sessions table. Prior to this change, it was possible to hit the cluster with an HTTP request which would cause the SQL to be run, before the SQL system was fully initialized -- specifically before the cluster version setting was initialized. This would crash the node. This change delays installation of the authentication mux until after the SQL system has been initialized, removing the possibility of this crash. Release note: None
- Loading branch information
Pete Vilter
committed
Sep 27, 2018
1 parent
860166f
commit e9a4ff6
Showing
1 changed file
with
27 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters