Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F925643
D102.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
Tue, May 20, 12:58 PM
Size
746 B
Mime Type
text/x-diff
Expires
Wed, May 21, 12:58 PM (2 h, 32 m)
Engine
blob
Format
Raw Data
Handle
634990
Attached To
D102: INP-1455 - Prevent direct access to pages configured with external url
D102.diff
View Options
Index: branches/5.2.x/core/kernel/utility/http_query.php
===================================================================
--- branches/5.2.x/core/kernel/utility/http_query.php
+++ branches/5.2.x/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