Repository navigation
Keep a host set to SSL on SSL when its TLS connection fails - #136
Merged
Merged
Conversation
The poller retried a failed api-ssl connection on the plaintext api port and, when that login worked, cleared the stored SSL setting. One failed TLS connection was enough to move the device to cleartext for every later poll. Log a specific error and skip the device instead; only the host edit form changes the setting. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
|
xmacan
approved these changes
Nov 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
Follow-up to #133. When the api-ssl connection to a host set to SSL fails,
mikrotik_api_open()retried on the plaintext api port (8728) and, if that login worked, cleared the storedsslsetting. One failed TLS connection, whether the device changed or a handshake was interrupted, was enough to send the credentials in cleartext and keep the host on cleartext for every later poll.The poller now logs one specific error and skips the device. The stored setting is changed only from the host edit form, which already preserves a saved
onvalue when api-ssl is unreachable. This removes the downgrade block, including the`ssl`quoting and single-attempt refinements added in #133.Related Issue
#133
How Has This Been Tested?
tests/Security/SslTransportPolicyTest.php(new) checks thatmikrotik_api_open()makes a singleconnect()call and never updatesplugin_mikrotik_credentials. It fails ondevelopand passes here.php -lclean; php-cs-fixer reports no new changes compared withdevelop.Types of changes