Perl UPS::Nut: decode NUT tokens and quote authentication arguments - #3634
Open
user01010111 wants to merge 2 commits into
Open
Perl UPS::Nut: decode NUT tokens and quote authentication arguments#3634user01010111 wants to merge 2 commits into
user01010111 wants to merge 2 commits into
Conversation
Decode NUT reply and configuration tokens once, including escaped INCLUDE paths, and quote literal authentication credentials. Preserve public return shapes and accept the actual CMDDESC response. Update POD, upgrade notes and the module version. Add a core-module regression script to check/distribution rules. Validated on Perl 5.005_04, 5.34.1 and 5.40.1, corrected-C comparisons, localhost upsd/dummy-ups, generated/installed modules and distcheck-light. Related: networkupstools#3629 AI assistance: OpenAI Codex with gpt-6-astra (high reasoning) and gpt-daybreak-blue-latest (high reasoning). The human contributor remains responsible for reviewing and submitting the change. Signed-off-by: user01010111 <12504630+user01010111@users.noreply.github.com>
8 tasks
|
A ZIP file with standard source tarball and another tarball with pre-built docs for commit c32a121 is temporarily available: NUT-tarballs-PR-3634.zip. |
|
❌ Build nut 2.8.5.5260-master failed (commit 7babaf67bf by @user01010111) |
Use a portable INCLUDE fixture while checking quote and backslash decoding at recursive AuthConf dispatch. Flush TAP before fork, exit the child normally and keep temporary-directory cleanup owned by the parent so the socket fixture completes under Windows pseudofork. Preserve timeouts, collision refusal and production behavior. Validated with all 236 assertions on macOS Perl 5.34.1, Linux 5.40.1 and 5.005_04, and Strawberry 5.42.3 under Wine/QEMU. Build, make check, spelling/style and distcheck-light pass. Wine does not establish exact AppVeyor/MSYS2 or Windows-kernel acceptance; MSYS2 Perl could not start under Wine before loading NUT. Related: networkupstools#3634 AI assistance: OpenAI Codex with gpt-6-astra (high reasoning). The human contributor remains responsible for reviewing and submitting the change. Signed-off-by: user01010111 <12504630+user01010111@users.noreply.github.com>
|
✅ Build nut 2.8.5.5263-master completed (commit 82eda57ff7 by @user01010111)
|
|
✅ Build nut 2.8.5.5263-master completed (commit 82eda57ff7 by @user01010111) |
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.
Reading an UPS description such as
"Main" C:\UPS\\end #1throughUPS::Nutcurrently leaves wire escapes in returned values. Parse NUTwords once in the shared query/list readers and in
nutauth.conf, includingescaped include paths, comments and line continuation. Encode literal
username/password arguments in
Authenticate()so credentials decodedfrom configuration can be sent correctly. Keep escaping
#on output forolder servers.
GetCmdDesc()now accepts the actualCMDDESCreply.Preserve scalar/hash/array result shapes, the space-separated
GetType()scalar, aliases and constructor/tied-read consumers. Keep existing include
resolution, precedence and the separate section-include inheritance FIXME.
Set(),InstCmd(), tied writes, tracking and TLS are outside this change.Single quotes in configuration are literal, following the C parser;
UPGRADING and POD explain the change and removal of manual decoding.
Bump the module to 1.63 and add a client-library release note.
Add one core-module regression script to the existing Perl-aware
make checkand distribution rules. Require the already documentedPerl 5.005 floor explicitly and use the existing FileHandle dependency
for configuration file opening on that runtime.
Related: #3629 (approved separate Perl follow-up).
Validation:
2caa3c87501a1aba25a3070ad66757470bd1bf03. All 235 pass with this change.pass the regression, including the constructor, fragmented/coalesced
localhost traffic, escaped credentials and temporary include filenames.
Privately installed generated modules pass the same regression.
exact token bytes and boundaries. This does not change the C parser's
character filter: Perl continues to preserve existing high-byte values.
upsd/dummy-upschecks cover descriptions, lists,variables, actual
CMDDESC, and AuthConf-to-login credentials containingspaces, quotes, backslashes and hashes. Escaped traffic works with the
unchanged server; raw quoted-hash configuration works with the separately
corrected C parser. That C change is not part of this patch.
NIT_CASE=perlpasses 4 groups with no failures or skips oncurrent macOS and Linux, including Linux Perl 5.005_04.
make checkpass, including 12 Automake tests,as do staged installs, POD syntax, spelling and style checks.
Final
make distcheck-lightpasses with all 270 real man pages present;the extracted archive builds, runs the regression and 12 Automake tests,
installs/uninstalls and cleans successfully. Its five changed source
files match this patch exactly.
No physical UPS hardware was available for testing. Validation covered
standalone regressions, deterministic localhost socket fixtures, and locally
built
upsdwith simulateddummy-upsdevices on macOS and Linux.Physical UPS models, firmware versions, and hardware combinations were
not tested.
Other operating systems were not executed. Perl 5.005_04 was provisioned
in an isolated Linux prefix with build adjustments for modern GCC, library
paths, shell dependency generation and a removed Linux header; this does
not establish Solaris 8 acceptance. Its supplemental interpreter self-test
run has four failures in preprocessing, Errno generation and an unavailable
DB module; the NUT regression and integration paths above all pass. There is no standard Perl-module install
rule in NUT, so its generated module was also copied to a private Perl
library directory for installed-path checks.
Relevant checklist:
AI assistance: OpenAI Codex with gpt-6-astra (high reasoning)
and gpt-daybreak-blue-latest (high reasoning).
The human contributor remains responsible for reviewing and submitting
the change.