Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1176031
D102.id242.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Oct 5, 2:33 PM
Size
701 B
Mime Type
text/x-diff
Expires
Mon, Oct 6, 2:33 PM (21 h, 10 m)
Engine
blob
Format
Raw Data
Handle
762846
Attached To
D102: INP-1455 - Prevent direct access to pages configured with external url
D102.id242.diff
View Options
Index: core/kernel/utility/http_query.php
===================================================================
--- core/kernel/utility/http_query.php
+++ core/kernel/utility/http_query.php
@@ -380,6 +380,13 @@
$this->Application->VerifyThemeId();
$this->Application->VerifyLanguageId();
}
+
+ $virtual_template = $this->Application->getVirtualPageTemplate($this->Get('m_cat_id'));
+
+ if ( ($virtual_template !== false) && preg_match('/external:(.*)/', $virtual_template) ) {
+ trigger_error('URL of page, that has "External URL" set was accessed: "<strong>' . $_SERVER['REQUEST_URI'] . '</strong>"', E_USER_NOTICE);
+ $this->Application->Redirect($virtual_template);
+ }
}
/**
Event Timeline
Log In to Comment