Commit Graph

86 Commits

Author SHA1 Message Date
Carlos Barberis
dc8dee7dd9 BUGFIX: Added condition to avoid error creating "PastMember" cookie on dev/build (ticket #5780) Thanks simon_w
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@108397 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:41 +13:00
Sam Minnee
d8b6b59ebd BUGFIX: Fixed Controller::join_links() handling of fragment identifiers
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@104580 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 14:19:21 +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
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
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
Sean Harvey
3d6c6a58d0 MINOR Security text whitespace change to be consistent with eachother when the site is accessed with BasicAuth enabled
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@90224 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-27 07:27:22 +00:00
Andrew Short
79773042be API CHANGE: Renamed conflicting classes to have an "SS_" namespace, and renamed existing "SS" namespace to "SS_". The affected classes are: HTTPRequest, HTTPResponse, Query, Database, SSBacktrace, SSCli, SSDatetime, SSDatetimeTest, SSLog, SSLogTest, SSLogEmailWriter, SSLogErrorEmailFormatter, SSLogErrorFileFormatter, SSLogFileWriter and SSZendLog.
MINOR: Replaced usage of renamed classes with the new namespaced name.

From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@90075 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-26 03:06:31 +00:00
Andrew Short
53450e1221 MINOR: Updated Controller to return a 404 on actions that don't exist, rather than a 403.
From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88506 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-11 00:07:24 +00:00
Andrew Short
da4b65c749 FEATURE: Added RequestHandler->hasAction() and Controller->hasAction() to check if a specific action is defined on a controller.
ENHANCEMENT: Updated ContentController->handleRequest() to use Controller->hasAction() to check whether to fall over to a child page, rather than relying on an error response from Controller->handleRequest().

From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88505 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-11 00:07:23 +00:00
Andrew Short
f29eceecff API CHANGE #3724: Unified the Link() method to accept an action parameter.
From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88495 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-11 00:07:16 +00:00
Andrew Short
c1c7973b95 BUGFIX: Fixed Controller::join_links() to properly handle multiple consecutive slashes.
From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88494 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-11 00:07:15 +00:00
Andrew Short
cf2cf11b57 ENHANCEMENT: Do not allow access to actions that have not been defined or do not have an action template.
ENHANCEMENT: Added Controller->hasActionTemplate() to check if a template exists for a specific action.

From: Andrew Short <andrewjshort@gmail.com>

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88477 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-11 00:07:01 +00:00
Ingo Schommer
e9d25ca2ce MINOR Moved documentation about Controller and RequestHandler to the right places
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@85775 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-07 00:14:11 +00:00
Tom Rix
7323a652bd FEATURE SingleSignOn - First commit, basic functionality. Until we get into a live environment, you can fake $_SERVER['REMOTE_USER'] in the site-wide _config.php.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@78035 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-28 00:22:07 +00:00
Will Rossiter
9384936c51 MINOR: updated legacy form comment. PATCH #3769
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77599 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-22 02:49:30 +00:00
Sean Harvey
a5e82ddff1 Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75590 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-29 01:20:24 +00:00
Sean Harvey
ec9765d9f2 Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75572 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-04-28 23:40:35 +00:00
Ingo Schommer
a96ca0eacc BUGFIX Checking for Director::is_site_url() before redirecting in Controller->redirectBack() and MemberLoginForm
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73252 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-17 22:24:50 +00:00
Geoff Munn
9448927b09 API CHANGE: NOW() replaced with DB-specific version
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72919 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-11 21:47:31 +00:00
Sam Minnee
fca5a8c573 Don't throw an error when trying to set the PastMember cookie if content has already been sent. It gets annoying when you're debugging.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@72901 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-11 04:44:03 +00:00
Andrew O'Neil
60f75c5ca4 Merged changes from 2.3 branch
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71172 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-01 23:49:53 +00:00
Sam Minnee
96c5be8252 Updating queries to be more DB agnostic
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@66507 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-24 09:31:14 +00:00
Sam Minnee
93438e0be2 API CHANGE: Adding double quotes to all table and field references (a work in progress)
API CHANGE: DataObject::get()'s GROUP BY clause is only generated for MySQL as it needs to be improved for other databases to accept it.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@66427 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-23 23:28:16 +00:00
Sam Minnee
2984355f43 Merged branches/2.3 into trunk
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@66395 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-22 03:33:00 +00:00
Sam Minnee
4f6170c265 BUGFIX: Better initial-site-setup boundary condition checking needed after the manifest builder update
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65469 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-09 22:11:25 +00:00
Sam Minnee
c1d6e82248 API CHANGE: Removed manifest's dependency on database, by removing hastable information [17:47:04]
dquote> API CHANGE: Deprecate ClassInfo::ready() in favour of Security::database_is_ready()
dquote> API CHANGE: Create DataObject::has_own_table() to determine whether a DataObject has a table without looking at it.
dquote> API CHANGE: Exclude /tests/ directories from the manifest entirely except when tests are being run.
dquote> API CHANGE: Added ?usetestmanifest=1 flag to access the test manifest outside of test execution.
dquote> API CHANGE: Simplified Core.php manifest include to just call ManifestBuilder::include_manifest() - manifest takes care of its own cache file

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65385 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-06 04:51:25 +00:00
Sam Minnee
cd699e3d89 API CHANGE #2857 - Renamed RequestHandlingData to RequestHandler
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64953 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-30 22:03:21 +00:00
Ingo Schommer
e820c88be0 MINOR Moved Controller::init() to top of file
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64403 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-16 11:08:51 +00:00
Ingo Schommer
079b491f2e API CHANGE Removed Controller::currentController(), use Controller::curr()
API CHANGE Removed Controller->LinkTo(), use Controller->join_links()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64377 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-16 08:40:08 +00:00
Ingo Schommer
be0d3e37c5 ENHANCEMENT Added Controller->redirectBack()
BUGFIX Storing HTTP "Referer" header from $_SERVER in Director::direct() and passing it along in Director::test()
ENHANCEMENT Storing a "fake referer" in TestSession->lastURL to allow for redirectBack() calls, e.g. after failed form validation

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64229 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-14 19:59:01 +00:00
Ingo Schommer
6878171375 ENHANCEMENT Added SSViewer->getTemplateFileByType() and SSViewer->setTemplateFile()
MINOR Documentation and formatting in SSViewer and Controller

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63680 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-06 19:25:45 +00:00
Ingo Schommer
78469b86e6 MINOR Documentation for HTTPRequest and RequestHandlingData
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63657 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-05 22:35:14 +00:00
Ingo Schommer
52ae575630 ENHANCEMENT Added Controller->getRequest()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63653 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-05 19:45:38 +00:00
Ingo Schommer
d53bbb0df1 ENHANCEMENT Added Controller->render($params) as a shortcut for Controller->customise($params)->renderWith(array('MyTemplate','MySubTemplate')) - templates are auto-detected by Controller->getViewer() and Controller->getAction()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63652 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-05 19:27:21 +00:00
Sam Minnee
13b7b4c4e7 Added instructions to try and prevent #2901 issues reoccurring
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63636 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-04 04:45:43 +00:00
Sam Minnee
6c159b07fb TESTS: Added tests for Controller::join_links()
ENHANCEMENT: You can now use Controller::join_links() to add querystring arguments to a URL

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@61685 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-08-28 04:25:13 +00:00
Sam Minnee
292140897a Allow querystrings in arguments passed to Controller::join_links()
Fix FormField::Link() to allow querystrings in the form's action


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@61064 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-08-19 10:06:43 +00:00
Sam Minnee
50790d8098 Added logging of SSViewer and Controller behaviour when using ?debug_request=1
API CHANGE: Template precedence changed.  Page_results now takes precedence over HomePage.  That is, all action templates of parent classes take precedence over the actionless templates.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@60711 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-08-14 03:35:13 +00:00
Sam Minnee
3574d3c3b6 Added argument checking to Controller::handleRequest()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@60377 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-08-11 04:48:45 +00:00
Ingo Schommer
2d8434a43f (merged from branches/roa. use "svn log -c <changeset> -g <module-svn-path>" for detailed commit message)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@60327 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-08-11 02:57:59 +00:00
Ingo Schommer
a1f37b93eb (merged from branches/roa. use "svn log -c <changeset> -g <module-svn-path>" for detailed commit message)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@60258 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-08-10 22:49:59 +00:00
Ingo Schommer
76bfb05bda BUGFIX Fixed reverted access checks in Controller->handleAction() due to merge error
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@60219 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-08-09 05:21:54 +00:00
Ingo Schommer
b5776e0438 (merged from branches/roa. use "svn log -c <changeset> -g <module-svn-path>" for detailed commit message)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@60207 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-08-09 03:54:55 +00:00
Ingo Schommer
6bd5da7e6e (merged from branches/roa. use "svn log -c <changeset> -g <module-svn-path>" for detailed commit message)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@60206 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-08-09 03:29:30 +00:00
Ingo Schommer
03fcc80e19 (merged from branches/roa. use "svn log -c <changeset> -g <module-svn-path>" for detailed commit message)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@60205 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-08-09 03:19:54 +00:00
Sam Minnee
ab28c127d0 BUGFIX: Prevent infinite loop by visiting page/run
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@58354 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-07-18 03:54:22 +00:00
Ingo Schommer
60860cc1b9 MINOR Unified @package PHPdoc (added where missing, removed duplicates)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@56212 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-06-15 13:33:53 +00:00
Sam Minnee
1bc00f4b2d Merged revisions 53066 via svnmerge from
http://svn.silverstripe.com/open/modules/sapphire/branches/2.2.2

........
  r53066 | sminnee | 2008-04-21 10:14:48 +1200 (Mon, 21 Apr 2008) | 2 lines
  
  Make double-redirects a warning rather than an error, since they are usually benign.
  Don't redirect from /home to / if you've already called a redirection.
........


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@53521 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-04-26 06:53:13 +00:00
Sam Minnee
45804905ed Merged revisions 52452 via svnmerge from
http://svn.silverstripe.com/open/modules/sapphire/branches/2.2.2

........
  r52452 | sminnee | 2008-04-10 13:59:09 +1200 (Thu, 10 Apr 2008) | 1 line
  
  Don't strtolower ->action, as it had too many side-effects.
........


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@53519 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-04-26 06:52:49 +00:00
Sam Minnee
eae79ab0de Merged revisions 52391 via svnmerge from
http://svn.silverstripe.com/open/modules/sapphire/branches/2.2.2

........
  r52391 | sminnee | 2008-04-09 17:58:21 +1200 (Wed, 09 Apr 2008) | 1 line
  
  Show security id errors on test sites as well as dev
........


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@53512 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-04-26 06:49:14 +00:00