HomeSoftware Heritage

fix(delagent): repair generation of hash for authentication

Description

fix(delagent): repair generation of hash for authentication

  • The function SHA1(...) could generate strings containing \000 which did not work with the following call of strlen(...)
  • This is solved, since one knows that a SHA1 hash as hex is 40 characters long (20 chars for the raw value)
  • The old test, whether the creation of the sha1 failed, can not work since the first char could also be \000 ==> removed

Details

Provenance
maximilianhuber <maximilian.huber@tngtech.com>Authored on Mar 1 2016, 1:53 PM
maximilianhuber <mail@maximilian-huber.de>Committed on Mar 29 2016, 9:27 PM
ardumontPushed on Feb 10 2021, 2:15 PM
Parents
rPFNe3248d4e5776: refactor(delagent): rewrite DeleteUpload and more
Branches
Unknown
Tags
Unknown

Event Timeline