/* Coming Soon
try {
$pdo = new PDO('mysql:host='. $ant['PDO']['Hostname'] .';dbname=' . $ant['PDO']['Database'], $ant['PDO']['Username'], $ant['PDO']['Password']);
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch(PDOException $e) {
die('ERROR: ' . $e->getMessage());
}*/
if($user->isLoggedIn()) {
header($ant['Site']['Location'] . '/backend/dashboard');
}
if($user->isLoggedIn()) {
header('Location: '.$ant['Site']['Location'].'/backend/dashboard');
exit;
}
Alright so, I get the lightweight part, but how in the world is this 'powerful'? If to be quite frank with you, all I see is ripped off parts of RevCMS, put together in a horribly messy manner to result in what you call 'antFramework'. Not that I'm accusing you of ripping, but you'll catch my drift eventually.
You said this 'framework' utilizes PDO for mysql handling, yet you release it with an incomplete if not, none existant database engine. Also, your 'antTpl' reminds me quite a lot of RevCMS's template engine, and if I were to be quite honest, I'd say you just edited a few parts then renamed it. Even the fact you use the keywords 'final' when you set a function, reminds me of RevCMS. Not only that, but if we take a look at your index file and compare it to RevCMS's index file, it'll remind us of Rev. Everything, from your .htaccess file to your 'antTpl', it's all Rev alike.
PHP:/* Coming Soon try { $pdo = new PDO('mysql:host='. $ant['PDO']['Hostname'] .';dbname=' . $ant['PDO']['Database'], $ant['PDO']['Username'], $ant['PDO']['Password']); $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); } catch(PDOException $e) { die('ERROR: ' . $e->getMessage()); }*/
Even that code sample makes me want to seperate my eyes from my face and throw them into a garbage can then light it up on fire, only to throw it deep down in an ocean after the fire settles down.
Also, it is highly unsuggestable to redirect in php and not kill the page after redirecting.
So this:
Needs to be this:PHP:if($user->isLoggedIn()) { header($ant['Site']['Location'] . '/backend/dashboard'); }
PHP:if($user->isLoggedIn()) { header('Location: '.$ant['Site']['Location'].'/backend/dashboard'); exit; }
Conclusion: I will never consider using this, and I would suggest everyone not to.
Custom password hashing
function antHash($string) {
$hash = md5($string);
$hash = substr($hash, 0, 8);
$hash = md5($hash);
return $hash;
}
I know that you personally have a lot of experience, but can you explain why it's still weak? If I hash a segment of a hash, then when a person decrypts it they will get a piece of a MD5 hash which won't be of any use to them (I think). Correct me where I'm wrong please, I'm trying to learn.This is not custom and this is still weak because it is md5. At least use sha1 with random salt if not on PHP 5.5 where the password_hash() function is available.PHP:function antHash($string) { $hash = md5($string); $hash = substr($hash, 0, 8); $hash = md5($hash); return $hash; }
Dictionary attacks, collision attacks, etc:I know that you personally have a lot of experience, but can you explain why it's still weak? If I hash a segment of a hash, then when a person decrypts it they will get a piece of a MD5 hash which won't be of any use to them (I think). Correct me where I'm wrong please, I'm trying to learn.