Is it safe to use session_id with MD5?

0

I'm taking session_id and putting it in MD5 encryption, to do a logout process.

I would like to know if you have any security issues with this, so what am I doing, or am I taking some risk in the future?

<a href="painel.php?logoff=true&token=<?php echo md5(session_id()); ?>">Sair</a>
if($logoff && $token == md5(session_id())){
    unset($_SESSION['userlogin']);
    session_destroy();
    header('Location: ../painel');
}
    
asked by anonymous 14.12.2017 / 19:23

0 answers