|
From: <gem...@li...> - 2012-05-03 14:37:17
|
Revision: 660
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=660&view=rev
Author: matijsdejong
Date: 2012-05-03 14:37:07 +0000 (Thu, 03 May 2012)
Log Message:
-----------
Documented name of alternative loop snippet
Content of fields with 'password' in name is no longer logged.
Modified Paths:
--------------
trunk/library/classes/Gems/Default/AskAction.php
trunk/library/classes/Gems/Log.php
Modified: trunk/library/classes/Gems/Default/AskAction.php
===================================================================
--- trunk/library/classes/Gems/Default/AskAction.php 2012-05-03 14:30:08 UTC (rev 659)
+++ trunk/library/classes/Gems/Default/AskAction.php 2012-05-03 14:37:07 UTC (rev 660)
@@ -46,9 +46,13 @@
class Gems_Default_AskAction extends Gems_Controller_Action
{
/**
+ * Usually a child of Gems_Tracker_Snippets_ShowTokenLoopAbstract,
+ * Track_Token_ShowAllOpenSnippet or Track_Token_ShowFirstOpenSnippet or
+ * a project specific one.
*
* @var array Or string of snippet names, presumably Gems_Tracker_Snippets_ShowTokenLoopAbstract snippets
*/
+ // protected $forwardSnippets = 'Track_Token_ShowAllOpenSnippet';
protected $forwardSnippets = 'Track_Token_ShowFirstOpenSnippet';
/**
Modified: trunk/library/classes/Gems/Log.php
===================================================================
--- trunk/library/classes/Gems/Log.php 2012-05-03 14:30:08 UTC (rev 659)
+++ trunk/library/classes/Gems/Log.php 2012-05-03 14:37:07 UTC (rev 660)
@@ -26,6 +26,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
+ *
* @version $Id$
* @package Gems
* @subpackage Log
@@ -110,7 +111,12 @@
if (!empty($request)) {
$info[] = 'Request Parameters:';
foreach ($request->getParams() as $key => $value) {
- $info[] = $key . ' => ' . $value;
+ // Make sure a password does not end in the logfile
+ if (false === strpos(strtolower($key), 'password')) {
+ $info[] = $key . ' => ' . $value;
+ } else {
+ $info[] = $key . ' => ' . str_repeat('*', strlen($value));
+ }
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|