From a0ae7bf111042a52c670026631f44e956075bafe Mon Sep 17 00:00:00 2001 From: Deon George Date: Sun, 5 Jul 2009 23:40:09 +1000 Subject: [PATCH] Fix added detection of password already encode when submitting updates --- lib/PageRender.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/PageRender.php b/lib/PageRender.php index ee1e6f3..e2fef63 100644 --- a/lib/PageRender.php +++ b/lib/PageRender.php @@ -834,6 +834,10 @@ class PageRender extends Visitor { } protected function getAutoPostPasswordAttribute($attribute,$i) { + # If the password is already encoded, then we'll return + if (preg_match('/^\{.+\}.+/',$attribute->getValue($i))) + return; + $attribute->setPostValue(array('function'=>'PasswordEncrypt','args'=>sprintf('%%enc%%;%%%s%%',$attribute->getName()))); $this->get('Post',$attribute,$i); }