Skip to content

Commit

Permalink
fix: empty previewPassword causes no redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
BernhardBaumrock committed Nov 2, 2023
1 parent 518788f commit c74596f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion RockMigrations.module.php
Original file line number Diff line number Diff line change
Expand Up @@ -2173,7 +2173,8 @@ private function hideFromGuests(): void
if ($this->wire->config->external) return;

// don't redirect if the session has the preview password
if ($this->wire->session->previewPassword === $this->previewPassword) return;
$matches = $this->wire->session->previewPassword === $this->previewPassword;
if ($this->previewPassword && $matches) return;

// don't redirect if we are on the login page
$loginID = $this->wire->config->loginPageID;
Expand Down

0 comments on commit c74596f

Please sign in to comment.