Skip to content

Conversation

@mathieu-mp
Copy link
Contributor

The function encrypt_cisco_type7 was incorrectly handling the integer 0 as a missing argument because of the thruthiness check (if not salt:). This resulted in a random salt being used when the user explicitely requested salt 0.

The condition has been updated to if salt is None to differentiate between a provided 0 and the default None.

Fixes #741

@mathieu-mp mathieu-mp marked this pull request as draft November 20, 2025 09:09
@mathieu-mp mathieu-mp marked this pull request as ready for review November 20, 2025 09:29
The function `encrypt_cisco_type7` was incorrectly handling the integer `0` as a missing argument because of the thruthiness check (`if not salt:`). This resulted in a random salt being used when the user explicitely requested salt `0`.

The condition has been updated to `if salt is None` to differentiate between a provided `0` and the default `None`.
@itdependsnetworks
Copy link
Contributor

seems reasonable to me.

@itdependsnetworks itdependsnetworks merged commit 608d9dc into networktocode:develop Dec 23, 2025
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

encrypt_cisco_type7 drops the salt argument when salt value is 0

3 participants