{"push_id":1147113463,"size":1,"distinct_size":1,"ref":"refs/heads/seed_master_passwords_118479861","head":"eba1f9655d6e66bf5099e169270c07df1f041f58","before":"1e0bf959a0683b186efffba545eb3b1b9dcfa6df","commits":[{"sha":"eba1f9655d6e66bf5099e169270c07df1f041f58","author":{"name":"Alex Tomlins","email":"31b9da3a3465b3ecfa36a9fa34a21a9e359978e7@digital.cabinet-office.gov.uk"},"message":"Fix the usage of md5 in utils.GetMD5B64\n\nThe 2 functions `md5.Sum` and `hash.Hash.Sum` are not equivelent.\n`md5.Sum` takes an byte slice, and returns its MD5 sum[1]. The Hash type\n(returned from `md5.New`) on the other hand has a different\ninterface[2]. It implements io.Writer, and therefore expects data to be\nadded to the hasher via a Write call. Its Sum function will append the\nhash to the given buffer.\n\nThis means that the previous implementation was appending the hash of\nempty string to the given text, and then truncating the result to the\nrequested length, meaning that it was effectively base64 encoding the\ntext without MD5 hashing it first.\n\nThere was also an issue with the truncation where it was being truncated\nbased on the length of the output from the md5 function, not based on\nthe output of the base64 function.\n\n[1] https://golang.org/pkg/crypto/md5/#Sum\n[2] https://golang.org/pkg/hash/#Hash","distinct":true,"url":"https://api.github.com/repos/alphagov/paas-rds-broker/commits/eba1f9655d6e66bf5099e169270c07df1f041f58"}]}
{"actor":{"display_login":"alext"}}