The Type of MD4 used by Alfresco 6.2GA Docker

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Active Member

The Type of MD4 used by Alfresco 6.2GA Docker

Hello,

I'm having an issue with admin password, I can't access my account anymore, and when I tried to reset it directly from the database, it did not work.

This is the output of the command :

SELECT anp1.node_id,
       anp1.qname_id,
       anp1.string_value
FROM alf_node_properties anp1
   INNER JOIN alf_qname aq1 ON aq1.id = anp1.qname_id
   INNER JOIN alf_node_properties anp2 ON anp2.node_id = anp1.node_id
   INNER JOIN alf_qname aq2 ON aq2.id = anp2.qname_id
WHERE aq1.local_name = 'hashIndicator'
AND aq2.local_name = 'username'
AND anp2.string_value = 'admin';

 node_id | qname_id | string_value 
---------+----------+--------------
       4 |      232 | md4

I have update it with this value : 209c6174da490caeb422f3fa5a7ae634

SELECT anp1.node_id,
       anp1.qname_id,       
       anp1.string_value       
FROM alf_node_properties anp1  
   INNER JOIN alf_qname aq1 ON aq1.id = anp1.qname_id   
   INNER JOIN alf_node_properties anp2 ON anp2.node_id = anp1.node_id    
   INNER JOIN alf_qname aq2 ON aq2.id = anp2.qname_id                    
WHERE aq1.local_name = 'passwordHash'
AND aq2.local_name = 'username'
AND anp2.string_value = 'admin';

 node_id | qname_id |           string_value           
---------+----------+----------------------------------
       4 |      231 | 209c6174da490caeb422f3fa5a7ae634

that's admin in MD4, but no luck.

I noticed that i get different result on multiple sites when trying to crypt the word "admin", so my question is what type of md4 is Alfresco using by default?

Thank you in advance.

1 Reply
Highlighted
Master

Re: The Type of MD4 used by Alfresco 6.2GA Docker

Alfresco uses regular MD4, but the input to the MD4 hash function is converted to little endian Unicode bytes. So if you created your hash out of big endian Unicode, it will not match.