Commit Graph

525 Commits

Author SHA1 Message Date
Ingo Schommer
7028a42658 BUGFIX Don't delete index.php after successful installation - in ContentController->deleteinstallfiles(). URL routing might rely on it without mod_rewrite.
BUGFIX Require ADMIN permissions for ContentController->deleteinstallfiles() - together with retaining index.php this removed a vulnerability where unauthenticated users can disrupt mod_rewrite-less URL routing. 

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@101227 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:04 +13:00
Sean Harvey
470082d12d BUGFIX Cookies set to a value other than NULL (effectively unsetting the cookie) will now use the httpOnly parameter by default for better XSS protection (from r101045)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@101046 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:00 +13:00
Ingo Schommer
c79a9d5a03 ENHANCEMENT Redirecting to translated page when original is requested with a 'locale' GET parameter (e.g. 'about-us/?locale=de_DE' will redirect to 'ueber-uns' with a 301 HTTP response). Implemented in ContentController->handleRequest(). (see #5001)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@100937 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:57 +13:00
Sean Harvey
2a583d9320 BUGFIX RequestHandler::handleRequest is now compatible with Controller::handleRequest in that SS_HTTPRequest is the type hint for the $request parameter
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@100919 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:57 +13:00
Ingo Schommer
2cbbcfe3ab MINOR SilverStripeNavigator.js used jquery.live instead of livequery, and doesn't include unnecessary behaviour.js
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@100883 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:55 +13:00
Sam Minnee
507da370ff MINOR: Director::currentPage() is deprecated but shouldn't throw a notice-level error until the next major release.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@100670 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:50 +13:00
Sean Harvey
00e3677ce8 API CHANGE Removed deprecated function RootURLController::get_homepage_urlsegment(), please use RootURLController::get_homepage_link() instead!
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@100493 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:46 +13:00
Sean Harvey
a8bd797f69 MINOR Changed @deprecated note for Director::redirectBack to 2.5 as it's still widely used
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@100483 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:46 +13:00
Ingo Schommer
7e4586d744 MINOR Documentation
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@99110 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:37 +13:00
Ingo Schommer
61d880ce68 MINOR Added Requirements for SilverStripeNavigator (see r99080)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@99097 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:37 +13:00
Ingo Schommer
1014bb6ef5 BUGFIX: Only show live link when page has been published (from r97839)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@99089 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:36 +13:00
Ingo Schommer
872d86e7f4 BUGFIX: Make sure draft/published links go to the right subsite (from r97747)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@99087 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:36 +13:00
Ingo Schommer
7f4a515649 BUGFIX: Fix navigator links not opening in new windows. (from r97510)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@99086 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:36 +13:00
Ingo Schommer
2805cfabdb FEATURE: Add Link to silverstripe navigator (from r97407)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@99080 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:36 +13:00
Ingo Schommer
ed8e75ea8d APICHANGE: Use the same navigator items in the CMS that are used on the frontend (from r97395)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@99079 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:36 +13:00
Ingo Schommer
530b943dae BUGFIX: Ensure that ModelAsController::init() can trigger redirections. (from r98702)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@99067 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:35 +13:00
Ingo Schommer
d1bdb6e9d4 BUGFIX: fix incorrect link in CMS (from r97408)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@99050 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:34 +13:00
Ingo Schommer
4e58e1996a BUGFIX: Make sure CMS link knows when its currently in the CMS (from r97403)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@99049 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:34 +13:00
Ingo Schommer
76b366e760 FEATURE: Make navigator items more overloadable (from r97376)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@99047 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:34 +13:00
Ingo Schommer
1f60bde524 FEATURE: Refactor links in $SilverStripeNavigator so modules can add extras (from r97299)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@99046 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:34 +13:00
Sean Harvey
d5683eda56 BUGFIX Fixed quoting on ContentController::successfullyinstaller() - this broke certain databases like PostgreSQL
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98777 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:31 +13:00
Ingo Schommer
ff724b44de MINOR Documentation
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98372 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:26 +13:00
Ingo Schommer
6a1b88aaf1 BUGFIX Fixed ContentController->deleteinstallfiles (added to $allowed_actions, see #5040)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98324 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:26 +13:00
Andrew O'Neil
508316a19c BUGFIX: Don't force SSL when running from CLI
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98272 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:25 +13:00
Sam Minnee
60f93644a0 BUGFIX: Updated SiteConfig-based theme selection to remove inappropriate coupling from SSViewer
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98263 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:25 +13:00
Sam Minnee
5efb72ce26 BUGFIX: Let ModelAsController::init() extensions trigger redirections. (from r97767)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98221 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:24 +13:00
Normann Lou
7c84d2f60b BUGFIX: remove the possibility that Director::isDev() could be recursively called when putting isDev=1 in $_GET, addressed in ticket #4978 (http://open.silverstripe.org/ticket/4978)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97926 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:18 +13:00
Carlos Barberis
263e9acf61 ENHANCEMENT: 2.4 tickets (#4670), new permission code to view draft stage w/o CMS access
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97895 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:17 +13:00
Ingo Schommer
bf35a7bc48 BUGFIX Checking that URL controller in HTTPRequest->match() is a subclass of Controller, not RequestHandler (which would include nested controllers like Form or FormField subclasses that shouldn't be accessible on their own toplevel URL namespace)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97881 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:17 +13:00
Sam Minnee
c212f40bb5 BUGFIX Use BASE_PATH and BASE_URL instead of data from $_SERVER.
API CHANGE: Determine default BASE_PATH/BASE_URL from the __FILE__ content, so that the script that initiated the Sapphire process doesn't matter.  This means that index.php doesn't need to manipulate those variables.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97731 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:15 +13:00
Sam Minnee
9ac547d32d BUGFIX: Don't rely on the current working directory for any file access; use BASE_PATH.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97728 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:15 +13:00
Andrew Short
46a8083e57 BUGFIX: Fixed nested URLs operation for pages more than 4 levels deep.
From: Andrew Short <andrewjshort@gmail.com> (from r95902)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97433 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:12 +13:00
Ingo Schommer
ccd9ecd230 API CHANGE Deprecated ContentController->LangAttributes(). Use ContentLocale() instead and write attribute names suitable to XHTML/HTML templates directly in the template.
ENHANCEMENT Added ContentController->ContentLocale() to allow XHTML/HTML specific lang= attribute settings in custom template code (see #4858). Removed <meta http-equiv="Content-Language"...> tag in SiteTree->MetaTags().
ENHANCEMENT Updated blackcandy theme to use new $ContentLocale attribute to set the locale of the current page (in Page.ss)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97207 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:10 +13:00
Sam Minnee
cfb2c2c027 BUGFIX: Amended some references to HTTPResponse, replacing with SS_HTTPResponse
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@96746 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:05 +13:00
Sam Minnee
2b717a1ea5 BUGFIX: Added better handling of rendering SiteTree objects, to prevent test errors. (from r89963)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@96729 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:18:03 +13:00
Sean Harvey
060c54370e BUGFIX Fixed ModelAsController::findOldPage() failing on MSSQLDatabase using "sqlsrv" driver
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@94885 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:59 +13:00
Andreas Piening
999995b83a MINOR: added cookies to Director::test()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@94684 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:58 +13:00
Andrew O'Neil
4bbf2bc040 MINOR: Use jquery instead of prototype for silverstripenavigator
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@93966 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:54 +13:00
Will Rossiter
40f448f824 API CHANGE: removed Director::Link(). Use Controller::join_links() instead
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@93785 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:54 +13:00
Sean Harvey
d93ee14be1 MINOR Removed calls to ContentNegotiator::disable() since it's disabled by default
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@93682 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:53 +13:00
Sean Harvey
24ed6150cf MINOR Removed ContentNegoitator::disable() from FormResponse - it's disabled already
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@93659 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:53 +13:00
Sean Harvey
bd37d67a48 MINOR Moved static functions in ContentNegotiator above the instance methods
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@93641 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:52 +13:00
Sean Harvey
b26b7e1228 API CHANGE Removed deprecated static function ContentNegotiator::disable() - it's disabled by default
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@93640 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:52 +13:00
Ingo Schommer
03c5caea72 MINOR Updated paths from jsparty to sapphire/thirdparty, cms/thirdparty and sapphire/javascript
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@93611 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:52 +13:00
Sean Harvey
f76acee01c BUGFIX Fixed dev/build not redirecting properly on first install of SS website on IIS
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@93259 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:38 +13:00
Sam Minnee
723d075ffd API CHANGE: Replaced BasicAuth::enable() with BasicAuth::protect_entire_site()
API CHANGE: BasicAuth::requireLogin() no longer has an option to automatically log you in.  You can call logIn() on the object returned, instead. (from r91603)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@91612 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:36 +13:00
Andrew O'Neil
e2a3cb2e20 BUGFIX: Return correct error when 404 page doesn't exist and page is not found.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@91209 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:35 +13:00
Ingo Schommer
3b794bb97a MINOR Changed silverstripe.com references to silverstripe.org
MINOR Fixed broken wiki links (#4672)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@90886 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:31 +13:00
Ingo Schommer
8cf532f623 BUGFIX Added ContentController->successfullyinstalled() to $allowed_actions
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@90876 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:17:31 +13:00
Ingo Schommer
949cadf377 MINOR Fixed broken links in docblocks
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@115949 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-01 20:05:47 +00:00
Ingo Schommer
e4c586f78e BUGFIX Checking for existence of FormAction in Form->httpSubmission() to avoid bypassing $allowed_actions definitions in controllers containing this form
BUGFIX Checking for $allowed_actions in Form class, through Form->httpSubmission()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@115182 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-12-20 00:00:38 +00:00
Ingo Schommer
ac2d6fa6d8 BUGFIX Checking for existence of draft and live records in SilverStripeNavigatorItem_ArchiveLink->getHTML()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@115130 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-12-16 20:45:00 +00:00
Ingo Schommer
f056abc818 ENHANCEMENT Added NullHTTPRequest as a placeholder for new RequestHandler/Controller instances that haven't handled a URL yet. This means RequestHandler->request can be safely called from singleton controllers
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@115116 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-12-16 04:06:13 +00:00
Ingo Schommer
9681134e8e ENHANCEMENT Added RequestHandler->setRequest() for easier testing of controllers (usually handled through handleRequest()). Moved $request definition from Controller into parent class (RequestHandler)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@115108 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-12-16 02:36:31 +00:00
Sean Harvey
bc62ca473a MINOR Removed redundant code from RequestHandler::handleRequest() referencing since removed Image_Uploader
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@115057 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-12-15 04:44:57 +00:00
Sean Harvey
127d682ba7 BUGFIX #6219 Director::direct() validation fails for doubly nested file fields (thanks ajshort!)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@114921 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-12-14 00:15:30 +00:00
Will Rossiter
815e9efd94 APICHANGE: removed page comments from core. Please see the github.com account for page comments functionality
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@114821 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-12-11 05:43:08 +00:00
Ingo Schommer
640b504ebe BUGFIX Don't allow HTML formatting in RequestHandler->httpError() by sending "Content-Type: text/plain" response headers.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@114444 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-12-02 08:03:17 +00:00
Ingo Schommer
07b6d1870a MINOR Checking for class_exists() before SapphireTest::is_running_tests() to avoid including the whole testing framework, and triggering PHPUnit to run a performance-intensive directory traversal for coverage file blacklists
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@114332 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-11-30 05:13:09 +00:00
Ingo Schommer
7be01d3d10 BUGFIX Fixed saving of files in IE6/IE7 in SS_HTTPRequest::send_file() by adding custom "Cache-Control" HTTP headers
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@114136 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-11-24 06:23:50 +00:00
Ingo Schommer
b15019a95f ENHANCEMENT Added SS_HTTPResponse->setStatusDescription() as equivalent to setStatusCode(). Added documentation.
BUGFIX Strip newlines and carriage returns from SS_HTTPResponse->getStatusDescription() (fixes #6222, thanks mattclegg)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@114082 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-11-23 19:38:15 +00:00
Sam Minnee
c07e870b4d BUGFIX ContentController::SiteConfig() should look to the SiteTree record so an alternate SiteConfig is considered, if this method doesn't exist on the data record then fall back to the default SiteConfig (from r111255)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112901 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 03:49:13 +00:00
Sam Minnee
b573414486 MINOR Spelling corrections to Director comments (from r111123)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112896 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 03:47:11 +00:00
Sam Minnee
0154fbae0f BUGFIX: makeRelative would return "false" for the root path, empty string is expected - fix that
BUGFIX: change the check in forceSSL to work on Windows - it sets the $_SERVER['https'] to off, instead of null (from r109712)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112828 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 01:25:50 +00:00
Sam Minnee
fcc20b5e1a BUGFIX Fixed ContentNegotiator to handle HTML and XHTML base tags properly when converting, regression from r108413 (from r108421)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112815 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 01:20:07 +00:00
Sam Minnee
ea1157f5b2 MINOR Doc update for Director::forceSSL() (from r109152)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112788 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 00:58:52 +00:00
Sam Minnee
43f4500cd6 MINOR Fixed tests not working on the web side as redirection to https would occur (from r108666)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112765 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 00:50:37 +00:00
Sam Minnee
50e9025bbb BUGFIX Undefined variable destURL in Director::forceWWW() (regression from r107094) (from r108492)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112752 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 00:37:22 +00:00
Sam Minnee
6a83da1455 MINOR Fixed Director::forceSSL() breaking unit tests because headers were already sent (from r108435)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112749 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 00:36:06 +00:00
Sam Minnee
63e425b418 ENHANCEMENT #2856 Limiting of relative URLs for Director::forceSSL() using a map of PCRE regular expressions (from r108428)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112745 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-19 00:32:42 +00:00
Sam Minnee
c4a72efd52 BUGFIX: Added condition to avoid error creating "PastMember" cookie on dev/build (ticket #5780) Thanks simon_w (from r108397)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112724 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-18 22:53:03 +00:00
Sam Minnee
cc15a7935e MINOR Added warning about Director::set_dev_servers() (from r108049)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112714 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-18 22:42:31 +00:00
Sam Minnee
298a6d320b BUGFIX: Don't have any host-based dev servers set by default. (from r108027)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112711 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-18 22:41:51 +00:00
Sam Minnee
93eb6214b7 ENHANCEMENT Allowing custom messages and permission codes in BasicAuth::protect_entire_site()
ENHANCEMENT Making $permissionCode argument optional for BasicAuth::requireLogin(). If not set the logic only checks for a valid account (but no group memberships)
ENHANCEMENT Using SS_HTTPResponse_Exception instead of header()/die() in BasicAuth::requireLogin() to make it more testable (from r107867)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112701 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-18 22:29:35 +00:00
Ingo Schommer
6ee6ab4ee7 ENHANCEMENT: abstracted protocol detection out to Director::protocol() #5450 (from r107094)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112550 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 03:09:32 +00:00
Ingo Schommer
fbbe0b4b39 BUGFIX: prevented HTTPRequest->shift() throwing notices when shifting multiple elements. APICHANGE: SS_HTTPRequest->shift($multiple) no longer returns an array of size $multiple spaced with nulls, it returns an array up to the size of $multiple. (from r107090)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112548 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 03:08:39 +00:00
Ingo Schommer
7fb414818a BUGFIX: fixed notice level errors getting through (from r107089)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112547 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 03:08:23 +00:00
Ingo Schommer
716b5cd6c5 BUGFIX: reverted revision 105890 to fix build (from r105903)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112509 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 02:53:31 +00:00
Ingo Schommer
3b4d0a7422 ENHANCEMENT: Added method for $this->request->latestParam() backwards compatibility with Director::urlParam() (from r105890)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112508 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 02:53:11 +00:00
Ingo Schommer
2b65c57f7c BUGFIX: Director::test() shouldn't break if $_SESSION isn't set. (from r104670)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112364 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 00:34:18 +00:00
Ingo Schommer
deb533238c BUGFIX: Generate stage/live links using Controller::join_links() instead of string concatenation. (from r104581)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112353 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 00:29:53 +00:00
Ingo Schommer
9cc825e769 BUGFIX: Fixed Controller::join_links() handling of fragment identifiers (from r104580)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112352 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 00:29:29 +00:00
Ingo Schommer
971d0f108f BUGFIX: When finding an old page in the 404 handler, favour existing subpages over historical ones. (from r104468)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112349 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 00:28:02 +00:00
Ingo Schommer
253c27e2a8 BUGFIX: Fix legacy URL redirection for pre-nestedurls URLs, after it has been enabled. (from r104463)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112347 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-15 00:05:18 +00:00
Ingo Schommer
ea32270eac MINOR: Recognize and allow HTTP/422 response code (from r104092)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112333 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-14 23:56:33 +00:00
Sam Minnee
ce06320134 BUGFIX: Better handling off calling Controller redirect() methods when handleRequest() hasn't been called.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112234 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-13 04:59:22 +00:00
Sam Minnee
752869e23b BUGFIX Renamed Nested URLs are automatically redirected to their new location with 301 HTTP status code in ModelAsController/ContentController (fixes #5393, thanks cbarberis) (from r103461)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112144 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-13 03:55:34 +00:00
Sam Minnee
6387f735e3 BUGFIX Only replace double slashes in SS_HTTPRequest->__construct() for relative- its a failsafe against wrongly formatted URLs like 'admin//assets' instead of 'admin/assets', but breaks absolute URLs with 'http://' prefix (from r103099)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112120 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-13 03:31:53 +00:00
Sam Minnee
eef3ff8021 BUGFIX: disallow numeric actions - numeric array indexes are incorrectly picked up as allowed actions (#5331) (from r103092)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112118 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-13 03:30:54 +00:00
Sam Minnee
83f117f58c MINOR Using canView() instead of deprecated can('view') in ContentController (from r102909)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112070 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-13 01:46:33 +00:00
Sam Minnee
64a561f96c BUGFIX Fixing RquestHandler->checkAccessAction() on PHP 5.2 - ReflectionMethod->class returns inconsisent results in older PHP versions. (see r102003) (from r102730)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112069 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-13 01:46:02 +00:00
Sam Minnee
e8e7065ff4 MINOR Fixed indentation (from r102009)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112055 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-13 01:26:16 +00:00
Sam Minnee
1d61bf7100 BUGFIX Prevent handling of controller actions which return $this avoid infinite loops in RequestHandler->handleRequest (thanks Hamish!) (from r102004)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112054 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-13 01:24:53 +00:00
Sam Minnee
740e49061f API CHANGE Disallow methods/actions in RequestHandler->checkAccessAction() which are implemented on parent classes (e.g. ViewableData and Object), unless access is controlled through $allowed_actions. This limits information exposure from getters used in template contexts. (from r102003)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112053 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-13 01:24:15 +00:00
Sam Minnee
28c2c67355 BUGFIX Checking for existing redirections in FormResponse::respond (fixes #5208) (from r101958)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112050 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-13 01:21:45 +00:00
Sam Minnee
2996e2a60d BUGFIX: disable function re-enabled (from r101792)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112036 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-13 01:07:35 +00:00
Sam Minnee
1e860727db BUGFIX: put back into the SSNavigator the archived site link (#5251) (from r101623)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112011 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-13 00:55:11 +00:00
Sam Minnee
9246add340 MINOR: fixed notice level error (from r101600)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112005 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-13 00:50:16 +00:00
Sam Minnee
559a05b059 MINOR Removed rewritest.php places in sapphire since it's no longer part of the phpinstaller/branches/2.4 package (from r101353)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@111995 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-13 00:43:39 +00:00
Sam Minnee
1dcc5401f6 MINOR Fixed missing closing <div> in ContentController->successfullyinstalled() (from r101254)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@111977 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-12 21:58:09 +00:00