Skip to content

Encoded exception_trace cannot be decoded. #17

@rthideaway

Description

@rthideaway

During base64 encoding of exception_trace you are actually encoding SHA-1 hash of serialized data, not serialized data. The critical line is: logs_http/logs_http.module:60

Where code is doing:

$return['exception_trace'] = Crypt::hashBase64(serialize($exception->getTrace()));

Crypt::hashBase64 is encoding SHA1 hash of given input:

  public static function hashBase64($data) {
    $hash = base64_encode(hash('sha256', $data, TRUE));
    // Modify the hash so it's safe to use in URLs.
    return str_replace(['+', '/', '='], ['-', '_', ''], $hash);
  }

So there is no way to get data back.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions