Fix SUT password truncation when value contains # - #383
Conversation
# Conflicts: # jsystem-core-projects/jsystemCore/pom.xml
Only unwrap legacy [#text: ...] node formatting so passwords and other values that contain # are preserved. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d462492ae6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| <groupId>org.jsystemtest</groupId> | ||
| <artifactId>jsystem-parent</artifactId> | ||
| <version>6.1.13-SNAPSHOT</version> | ||
| <version>6.1.12-SNAPSHOT</version> |
There was a problem hiding this comment.
Keep the project on the 6.1.13 development version
When this commit is applied on top of 678a08b, changing the parent and all child modules back to 6.1.12-SNAPSHOT makes subsequent builds and deployments publish under the previous development line rather than 6.1.13-SNAPSHOT. That can overwrite or consume stale 6.1.12 snapshot artifacts and is unrelated to the SUT parsing fix, so the existing 6.1.13 version should be preserved.
Useful? React with 👍 / 👎.
| AgentListTableModel(Vector<Object> model, Vector<String> columns) { | ||
| super(model, columns); | ||
| super(); |
There was a problem hiding this comment.
Initialize the agents table with its supplied data
Whenever AgentsDialog.initDialog() is opened, this no-argument superclass call discards both the populated model and its columns. The resulting JTable has zero columns, and table.getColumnModel().getColumn(0) in the same initialization path immediately throws, so the Agents List dialog cannot open.
Useful? React with 👍 / 👎.
| AgentSelectTableModel(Vector<Object> model, Vector<String> columns) { | ||
| super(model, columns); | ||
| super(); |
There was a problem hiding this comment.
Initialize the agent-selection table with its supplied data
Opening the Select Agents dialog now constructs an empty DefaultTableModel instead of using the discovered agents and three supplied columns. initDialog() subsequently accesses columns 0, 1, and 2, so it throws while opening; even without those accesses, getSelectedUrls() would always return an empty selection.
Useful? React with 👍 / 👎.
| final int responseCode = client.executeMethod(method); | ||
| handleResponseCode(method, responseCode); | ||
| return Integer.parseInt(method.getResponseBodyAsString()); |
There was a problem hiding this comment.
Release Difido HTTP connections after every request
During remote Difido reporting, this and every other request method now execute without a finally block calling method.releaseConnection(). Apache HttpClient keeps the connection associated with the method until it is released, so repeated test-detail and file requests leak/hold connections and can eventually stall reporting; error responses also leak because handleResponseCode() may throw.
Useful? React with 👍 / 👎.
| dcipher.init(Cipher.DECRYPT_MODE, key); | ||
| // Decode base64 to get bytes | ||
| byte[] dec = new sun.misc.BASE64Decoder().decodeBuffer(str); | ||
| byte[] dec = Base64.getDecoder().decode(str); |
There was a problem hiding this comment.
Preserve decoding of line-wrapped encrypted values
For existing encrypted values long enough to have been produced with line wrapping by the previous sun.misc.BASE64Encoder implementation, Base64.getDecoder() rejects the embedded CR/LF characters with IllegalArgumentException. This breaks decryption of previously persisted long passwords or secrets after upgrading; a MIME/whitespace-tolerant decoder is needed for backward compatibility.
Useful? React with 👍 / 👎.
| if("true".equals(JSystemProperties.getInstance().getPreferenceOrDefault(FrameworkOptions.SORT_ASSETS_TREE))){ | ||
| Collections.sort(children); | ||
| Comparator comparator = Collections.reverseOrder(); | ||
| Collections.sort(children,comparator); |
There was a problem hiding this comment.
Retain ascending asset-tree sorting
When SORT_ASSETS_TREE is enabled, replacing the former natural sort with Collections.reverseOrder() changes the assets tree from ascending to descending order because AssetNode.compareTo() compares names directly. The same reversal was added for test methods in TestCaseNode, so users requesting a sorted tree now see both levels in Z-to-A order.
Useful? React with 👍 / 👎.
Summary
getValueincorrectly treated any value containing#as legacy Xerces[#text: ...]formatting and stripped the last character.StringUtils.unwrapXercesTextNodethat only unwraps when the value matches[#text: ...], preserving passwords likeSXr0ng!ReaTxnly#2386.SystemManagerImplclass/reference handling.Test plan
#(e.g. password) and resolve${sut:...}; confirm the full value is returned[#text: com.example.Foo]value still unwraps tocom.example.Foo#