CodeIgniter Forums
DMZ 1.7.1 (DataMapper OverZealous Edition) - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22)
+--- Thread: DMZ 1.7.1 (DataMapper OverZealous Edition) (/showthread.php?tid=28550)



DMZ 1.7.1 (DataMapper OverZealous Edition) - El Forum - 01-12-2011

[eluser]WanWizard[/eluser]
DataMapper ORM v1.8.0 has been released.

Use this thread for discussions or questions about v1.8.0.

People using older versions are strongly advised to upgrade to the new version. As of now, DMZ 1.7.1. is no longer officially supported.

Version 1.8.0 is a drop-in replacement for DMZ 1.7.1. See the new thread for an overview of fixes, enhancements and new functionality.


I would like to take this opportunity to thank Overzealous for all the hard work he's put into DMZ over the last few years, and for making the product what it is today. Kudos Overzealous!


DMZ 1.7.1 (DataMapper OverZealous Edition) - El Forum - 01-14-2011

[eluser]Matt Borja[/eluser]
I'd be interested in taking a look at the code if no one else has stepped forward. If you have a moment, could you send a copy of everything related in an archive file to [email protected]?

Thanks


DMZ 1.7.1 (DataMapper OverZealous Edition) - El Forum - 01-15-2011

[eluser]WanWizard[/eluser]
Matt,

What do you mean by this? I've just released a new version, see http://ellislab.com/forums/viewthread/178045/


DMZ 1.7.1 (DataMapper OverZealous Edition) - El Forum - 01-15-2011

[eluser]Matt Borja[/eluser]
[quote author="WanWizard" date="1295109635"]Matt,

What do you mean by this? I've just released a new version, see http://ellislab.com/forums/viewthread/178045/[/quote]

Posted prior to finding DataMapper. Thought this was another discontinued project with some code I might be able to use. Didn't feel like paging through 20 some pages from the first post indicating it was discontinued either.


DMZ 1.7.1 (DataMapper OverZealous Edition) - El Forum - 02-14-2011

[eluser]DonkeyKong[/eluser]
Hello
I have problems with validating 2 password fields ("Password" and "Confirm password").

The problem is caused by encryption library I'm using (phpass - one way encryption) and "matches" rule set for "Confirm password":
Code:
'password' => array ('label' => 'Password', 'rules' => array('trim', 'required', 'max_length' => 25, 'encrypt')),
'confirm_password' => array ('label' => 'Confirm Password', 'rules' => array('trim', 'required', 'max_length' => 25, 'matches' => 'password', 'encrypt' )),

On each _encrypt function call, we get different strings/encrypted passwords, so "matches" rule simply won't work.

I know it's possible to solve this by creating custom validation where we compare values of 2 password input fields, but I would like to know is there an elegant solution.

Thanks


DMZ 1.7.1 (DataMapper OverZealous Edition) - El Forum - 02-14-2011

[eluser]WanWizard[/eluser]
Do I understand it correctly that you have a one-way encryption function that generates a different result when encrypting the same string?
If so, wouldn't it be better to use a randomizer, it would be as effective...

When using the same phpass configuration and salt value, the hash should be the same for both password fields.

I suggest you look at your implementation of phpass it this is not the case.


DMZ 1.7.1 (DataMapper OverZealous Edition) - El Forum - 02-14-2011

[eluser]DonkeyKong[/eluser]
For higher security, it's not a good idea to have predefined salt and use it for all passwords.

Phpass deals with random salts internally:
Quote:Phpass transparently generates random salts when a new password or passphrase is hashed, and it encodes the hash type, the salt, and the password stretching iteration count into the "hash encoding string" that it returns

So setting a salt is simply not a solution to me.


DMZ 1.7.1 (DataMapper OverZealous Edition) - El Forum - 02-14-2011

[eluser]WanWizard[/eluser]
I never said you should use a predefined salt, I said you should use the same salt value on both encrypt calls.
And it that's no option, do the comparison in your own 'matches' method, or in your encrypt method before you hash it.

Just don't call it a Datamapper issue, which it isn't.


DMZ 1.7.1 (DataMapper OverZealous Edition) - El Forum - 02-14-2011

[eluser]DonkeyKong[/eluser]
Where I said it's a Datamapper issue? Smile

Thanks anyway, I'll go with custom validation rule for both password fields.


DMZ 1.7.1 (DataMapper OverZealous Edition) - El Forum - 02-20-2011

[eluser]ramm[/eluser]
Hi

I'm trying to make a loop inside a loop, and i kind of made it work, but i feel like there has to be a better way to do this, because i can do the same thing without the ORM.

Code:
function test()
    {
        $c = new Chain();
        $c->get();
        
        foreach($c as $chain)
        {
            echo "<h3>".$chain->nme."</h3>";
            $r = new Restaurant();
            $r->where('chain_id', $chain->id)->get();
            foreach($r as $rest)
            {
                echo $rest->name."<br />";
            }
        }
    }