mirror of
https://github.com/Cacti/cacti.git
synced 2026-10-29 08:06:58 +09:00
Excludes vendored packages, third-party JS, patches, and the Win32 probe fixture. Pure EOL change; guards pass and php -l is clean.
23 lines
852 B
PHP
23 lines
852 B
PHP
<?php
|
|
/*
|
|
+-------------------------------------------------------------------------+
|
|
| Copyright (C) 2004-2026 The Cacti Group |
|
|
+-------------------------------------------------------------------------+
|
|
*/
|
|
|
|
/*
|
|
* GHSA-m3fh-gxqj-76hq: the SNMPv3 credential device fields (sibling of the
|
|
* snmp_community newline defect) must strip control characters before the
|
|
* values reach the net-snmp command line.
|
|
*/
|
|
|
|
$root = dirname(__DIR__, 4);
|
|
|
|
test('SNMPv3 credential fields strip control characters (GHSA-m3fh)', function () use ($root) {
|
|
$s = file_get_contents($root . '/lib/api_device.php');
|
|
|
|
expect($s)->toContain('(string) form_input_validate($snmp_password')
|
|
->and($s)->toContain('(string) form_input_validate($snmp_priv_passphrase')
|
|
->and($s)->toContain('(string) form_input_validate($snmp_community');
|
|
});
|