* fix: accept NUL-padded RPTC callsigns in login check
Fixed-width RPTC fields may be padded with NUL (ipsc2hbp) or spaces
(MMDVM). str.rstrip() left trailing NULs so matching DB callsigns were
rejected with MSTNAK after a successful passphrase exchange.
* fix: strip NUL padding from RPTO OPTIONS in logs and storage
ipsc2hbp pads the fixed-width RPTO body with NULs; logs showed ^@ noise
and peer CALLSIGN as raw bytes on the options line. Normalize on ingest
and in redact_pass_in_options.
* fix: strip NUL padding from monitor export and shared HBP fields
Centralize fixed-width NUL/space trimming in domain helpers and use them
for dashboard_state peer fields, OPTIONS parsing, proxy self-service, and
remaining CALLSIGN log lines.
"""Same as legacy: bhex(sha256(salt_str + password).hexdigest())."""
returnbhex(sha256(salt_str+password).hexdigest())
@ -970,7 +976,7 @@ class HBPProtocol(DatagramProtocol):
ifmode=="MASTER":
for_peerinself._peers:
self.send_peer(_peer,b"".join([MSTCL,_peer]))
logger.info("(%s) De-Registration sent to Peer: %s (%s)",self._system,self._peers[_peer].get("CALLSIGN",b""),self._peers[_peer].get("RADIO_ID",b""))
logger.info("(%s) De-Registration sent to Peer: %s (%s)",self._system,_rptc_field_str(self._peers[_peer].get("CALLSIGN",b"")),self._peers[_peer].get("RADIO_ID",b""))
logger.info("(%s) De-Registration sent to Master: %s:%s",self._system,self._config.get("MASTER_SOCKADDR",("?","?"))[0],self._config.get("MASTER_SOCKADDR",("?","?"))[1])
@ -1073,7 +1079,7 @@ class HBPProtocol(DatagramProtocol):
forpeerinremove_list:
logger.info(
"(%s) Peer %s (%s) has timed out and is being removed",
logger.info("(%s) Callsign does not match subscriber database: ID: %s, Sent Call: %s, DB call %s",self._system,int_id(_peer_id),_this_peer["CALLSIGN"].decode("utf8",errors="replace").rstrip(),self.validate_id(_peer_id))
logger.info("(%s) Callsign does not match subscriber database: ID: %s, Sent Call: %s, DB call %s",self._system,int_id(_peer_id),_sent_call,self.validate_id(_peer_id))
logger.log(logging.TRACEifhasattr(logging,"TRACE")elselogging.DEBUG,"(%s) Received and answered RPTPING from peer %s (%s)",self._system,self._peers[_peer_id]["CALLSIGN"],int_id(_peer_id))
logger.log(logging.TRACEifhasattr(logging,"TRACE")elselogging.DEBUG,"(%s) Received and answered RPTPING from peer %s (%s)",self._system,_rptc_field_str(self._peers[_peer_id]["CALLSIGN"]),int_id(_peer_id))