Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-07-19 14:37:59

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

Just curious - wh set of chars for pass generation isn't full?

From txplib_admin.php:

	function generate_password($length = 10)
	{
		$pass = '';
		$chars = '023456789bcdfghjkmnpqrstvwxyz';
		$i = 0;

		while ($i < $length)
		{
			$char = substr($chars, mt_rand(0, strlen($chars)-1), 1);

			if (!strstr($pass, $char))
			{
				$pass .= $char;
				$i++;
			}
		}

		return $pass;
	}

$chars = '023456789bcdfghjkmnpqrstvwxyz'; – Why here there are no “1”, “a”, “i”, “u” chars?

Just curious :)

Last edited by the_ghost (2008-07-19 14:38:50)


Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?

Offline

#2 2008-07-19 14:56:37

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Just curious - wh set of chars for pass generation isn't full?

I think the 1 and i are left out because they are too much alike… but that doesn’t explain the omission of a and u.

Offline

#3 2008-07-19 17:49:33

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,028
Website GitHub Mastodon Twitter

Re: Just curious - wh set of chars for pass generation isn't full?

I would also think – most probably in my ignorance – that #0 could be left out as it could be confused with letter o


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#4 2008-07-19 18:21:58

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Just curious - wh set of chars for pass generation isn't full?

Looks like the ‘o’ and ‘e’ are missing too.

Offline

#5 2008-07-19 19:03:45

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Just curious - wh set of chars for pass generation isn't full?

SVN changeset 2944

I’ve added the vowels back in and removed the zero. The lowercase o and i can’t be confused with the numbers 0 and 1 respectively, but the 0 and 1 could be mistaken for an uppercase O and l (L).

Offline

Board footer

Powered by FluxBB