Skip to content

Merge the “develop” branch into “master” for 6.7 Release#11647

Merged
ofahimIQSS merged 2605 commits into
masterfrom
develop
Jul 17, 2025
Merged

Merge the “develop” branch into “master” for 6.7 Release#11647
ofahimIQSS merged 2605 commits into
masterfrom
develop

Conversation

@ofahimIQSS

Copy link
Copy Markdown
Contributor

Merge the “develop” branch into “master” for 6.7 Release

poikilotherm and others added 30 commits June 4, 2025 00:41
Error correction: the flex stack options are not available for the app or config images, only for the base image!
Eliminated a redundant "Supported Image Tags" heading for improved clarity and readability in the documentation.
Summarized enhancements including versioned tags, workflow reorganization, backport support, base image migration to Ubuntu, and improved documentation for better lifecycle management and operational clarity.
Switched references from `alpha` to `latest` tags in demo compose file and documentation for Dataverse and ConfigBaker images. Adjusted related explanations to reflect this change and provided guidance on using specific version tags for consistency.
…age workflows

Ensured required permissions for `contents` and `packages` in `application-image` and `configbaker-image` workflows to align with best practices and enhance security.
Ensure password-related commands properly handle failures and print warnings if changes cannot be applied. Backported changes to v6.4, v6.5, and v6.6.
…with ro rootfs

Added a note about incompatibility with read-only root filesystems when modifying `/etc/shadow`.
…tation processor #11487

Before JDK 23, the annotation processor for Auto Service was picked up automatically. With newer JDKs, the META-INF/services files were not generated, which made it impossible for the PID Factories to be picked up by the ServiceLoader at runtime.

Following the documentation, we seem to have missed adding the annotation processor to the Maven Build Plugin. Adding this missing bit re-enables the auto-generation on newer JDKs.

See also: https://github.com/google/auto/blob/bb4d48e4ca0bda0e75b3b67f6ff4f464db9304e4/service/README.md
…91-displayOnCreate-with-template

Addition to IQSS/11391 display on create with template
Fix password script in base container image
Fix @autoservice classes not being loaded at runtime when using JDK23+ for compilation
Removed temporary testing condition for `gdcc/wip-base-image` and reinstated the `if` condition to restrict workflow runs to the upstream `IQSS` repository.
Introduced documentation detailing the structure, purpose, and usage of the `src/backports` directory to support consistent patch management across multiple Dataverse release versions.
@ofahimIQSS ofahimIQSS added this to the 6.7 milestone Jul 17, 2025
} catch (Exception e) {
alr.setActionResult(ActionLogRecord.Result.InternalError);
alr.setInfo(alr.getInfo() + "// " + e.getMessage());
return error(Response.Status.INTERNAL_SERVER_ERROR, e.getMessage());

Check warning

Code scanning / CodeQL

Information exposure through an error message Medium

Error information
can be exposed to an external user.

Copilot Autofix

AI about 1 year ago

To fix the issue, replace instances of e.getMessage() being sent to the client with a generic error message. Log the detailed exception message on the server for debugging purposes. This ensures that sensitive information is not exposed to users while still retaining the ability to debug issues internally.

In the specific case of line 1031, replace the call to error(Response.Status.INTERNAL_SERVER_ERROR, e.getMessage()) with a generic error message such as "An error occurred while processing your request.". Add a Logger instance to log the full exception details.


Suggested changeset 1
src/main/java/edu/harvard/iq/dataverse/api/Admin.java

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/src/main/java/edu/harvard/iq/dataverse/api/Admin.java b/src/main/java/edu/harvard/iq/dataverse/api/Admin.java
--- a/src/main/java/edu/harvard/iq/dataverse/api/Admin.java
+++ b/src/main/java/edu/harvard/iq/dataverse/api/Admin.java
@@ -1028,7 +1028,8 @@
         } catch (Exception e) {
             alr.setActionResult(ActionLogRecord.Result.InternalError);
             alr.setInfo(alr.getInfo() + "// " + e.getMessage());
-            return error(Response.Status.INTERNAL_SERVER_ERROR, e.getMessage());
+            Logger.getLogger(Admin.class.getName()).log(Level.SEVERE, "Error updating builtin role", e);
+            return error(Response.Status.INTERNAL_SERVER_ERROR, "An error occurred while processing your request.");
         } finally {
             actionLogSvc.log(alr);
         }
EOF
@@ -1028,7 +1028,8 @@
} catch (Exception e) {
alr.setActionResult(ActionLogRecord.Result.InternalError);
alr.setInfo(alr.getInfo() + "// " + e.getMessage());
return error(Response.Status.INTERNAL_SERVER_ERROR, e.getMessage());
Logger.getLogger(Admin.class.getName()).log(Level.SEVERE, "Error updating builtin role", e);
return error(Response.Status.INTERNAL_SERVER_ERROR, "An error occurred while processing your request.");
} finally {
actionLogSvc.log(alr);
}
Copilot is powered by AI and may make mistakes. Always verify output.
Unable to commit as this autofix suggestion is now outdated
logger.log(Level.WARNING, "Dataset metadata update: exception while parsing JSON: {0}", ex);
return error(BAD_REQUEST, BundleUtil.getStringFromBundle("file.addreplace.error.parsing"));
} catch (DataFileTagException de) {
return error(BAD_REQUEST, de.getMessage());

Check warning

Code scanning / CodeQL

Information exposure through an error message Medium

Error information
can be exposed to an external user.

Copilot Autofix

AI about 1 year ago

To fix the issue, the code should avoid exposing exception details in the response. Instead:

  1. Log the exception details (including the message) on the server for debugging.
  2. Return a generic error message to the user that does not reveal internal details.

Specifically, replace de.getMessage() in the response with a neutral, user-friendly message (e.g., "Error updating file metadata tags"). Log the detailed exception message using the logger.


Suggested changeset 1
src/main/java/edu/harvard/iq/dataverse/api/Datasets.java

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/src/main/java/edu/harvard/iq/dataverse/api/Datasets.java b/src/main/java/edu/harvard/iq/dataverse/api/Datasets.java
--- a/src/main/java/edu/harvard/iq/dataverse/api/Datasets.java
+++ b/src/main/java/edu/harvard/iq/dataverse/api/Datasets.java
@@ -4889,7 +4889,8 @@
             logger.log(Level.WARNING, "Dataset metadata update: exception while parsing JSON: {0}", ex);
             return error(BAD_REQUEST, BundleUtil.getStringFromBundle("file.addreplace.error.parsing"));
         } catch (DataFileTagException de) {
-            return error(BAD_REQUEST, de.getMessage());
+            logger.log(Level.WARNING, "Dataset metadata update: DataFileTagException occurred: {0}", de.getMessage());
+            return error(BAD_REQUEST, "Error updating file metadata tags.");
         }catch (Exception e) {
             logger.log(Level.WARNING, "Dataset metadata update: exception while processing:{0}", e);
             return error(Response.Status.INTERNAL_SERVER_ERROR, "Error updating metadata for DataFiles: " + e);
EOF
@@ -4889,7 +4889,8 @@
logger.log(Level.WARNING, "Dataset metadata update: exception while parsing JSON: {0}", ex);
return error(BAD_REQUEST, BundleUtil.getStringFromBundle("file.addreplace.error.parsing"));
} catch (DataFileTagException de) {
return error(BAD_REQUEST, de.getMessage());
logger.log(Level.WARNING, "Dataset metadata update: DataFileTagException occurred: {0}", de.getMessage());
return error(BAD_REQUEST, "Error updating file metadata tags.");
}catch (Exception e) {
logger.log(Level.WARNING, "Dataset metadata update: exception while processing:{0}", e);
return error(Response.Status.INTERNAL_SERVER_ERROR, "Error updating metadata for DataFiles: " + e);
Copilot is powered by AI and may make mistakes. Always verify output.
Unable to commit as this autofix suggestion is now outdated
Comment on lines 5861 to 5911

Check warning

Code scanning / CodeQL

Information exposure through an error message Medium

Error information
can be exposed to an external user.
Error information
can be exposed to an external user.

Copilot Autofix

AI about 1 year ago

The fix involves replacing the usage of ex.getMessage() in error responses with a generic error message for external users. Detailed exception information should be logged on the server for debugging purposes. This approach ensures that sensitive information is not leaked to users while still allowing developers to diagnose issues.

  1. Replace ex.getMessage() in the BAD_REQUEST response on line 5904 with a generic error message, such as "File deletes failed due to an internal error."
  2. Log the exception details (ex.getMessage() or ex.printStackTrace()) on the server for debugging purposes.
Suggested changeset 1
src/main/java/edu/harvard/iq/dataverse/api/Datasets.java

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/src/main/java/edu/harvard/iq/dataverse/api/Datasets.java b/src/main/java/edu/harvard/iq/dataverse/api/Datasets.java
--- a/src/main/java/edu/harvard/iq/dataverse/api/Datasets.java
+++ b/src/main/java/edu/harvard/iq/dataverse/api/Datasets.java
@@ -5900,11 +5900,11 @@
             } catch (PermissionException ex) {
                 return error(FORBIDDEN, "You do not have permission to delete files ont this dataset.");
             } catch (CommandException ex) {
-                return error(BAD_REQUEST,
-                        "File deletes failed for dataset ID " + id + " (CommandException): " + ex.getMessage());
+                logger.log(Level.SEVERE, "File deletes failed for dataset ID " + id + " (CommandException): ", ex);
+                return error(BAD_REQUEST, "File deletes failed due to an internal error.");
             } catch (EJBException ex) {
-                return error(jakarta.ws.rs.core.Response.Status.INTERNAL_SERVER_ERROR,
-                        "File deletes failed for dataset ID " + id + "(EJBException): " + ex.getMessage());
+                logger.log(Level.SEVERE, "File deletes failed for dataset ID " + id + " (EJBException): ", ex);
+                return error(jakarta.ws.rs.core.Response.Status.INTERNAL_SERVER_ERROR, "File deletes failed due to an internal error.");
             }
             return ok(fileIds.size() + " files deleted successfully");
 
EOF
@@ -5900,11 +5900,11 @@
} catch (PermissionException ex) {
return error(FORBIDDEN, "You do not have permission to delete files ont this dataset.");
} catch (CommandException ex) {
return error(BAD_REQUEST,
"File deletes failed for dataset ID " + id + " (CommandException): " + ex.getMessage());
logger.log(Level.SEVERE, "File deletes failed for dataset ID " + id + " (CommandException): ", ex);
return error(BAD_REQUEST, "File deletes failed due to an internal error.");
} catch (EJBException ex) {
return error(jakarta.ws.rs.core.Response.Status.INTERNAL_SERVER_ERROR,
"File deletes failed for dataset ID " + id + "(EJBException): " + ex.getMessage());
logger.log(Level.SEVERE, "File deletes failed for dataset ID " + id + " (EJBException): ", ex);
return error(jakarta.ws.rs.core.Response.Status.INTERNAL_SERVER_ERROR, "File deletes failed due to an internal error.");
}
return ok(fileIds.size() + " files deleted successfully");

Copilot is powered by AI and may make mistakes. Always verify output.
Unable to commit as this autofix suggestion is now outdated
@AuthRequired
public Response addExternalTool(@Context ContainerRequestContext crc, String manifest) {
Response notAuthorized = authorize(crc);
return notAuthorized == null ? externalTools.addExternalTool(manifest) : notAuthorized;

Check warning

Code scanning / CodeQL

Information exposure through an error message Medium

Error information
can be exposed to an external user.

Copilot Autofix

AI about 1 year ago

Copilot could not generate an autofix suggestion

Copilot could not generate an autofix suggestion for this alert. Try pushing a new commit or if the problem persists contact support.

} catch (WrappedResponse resp) {
return resp.getResponse();
} catch (JsonException je) {
return error(Response.Status.BAD_REQUEST, "Invalid JSON; error message: " + je.getMessage());

Check warning

Code scanning / CodeQL

Information exposure through an error message Medium

Error information
can be exposed to an external user.

Copilot Autofix

AI about 1 year ago

To address the issue, the code should replace the detailed error message containing je.getMessage() with a generic message such as "Invalid JSON input." This ensures that no sensitive information is exposed to external users. The detailed exception information should instead be logged on the server for debugging purposes.

The changes required are:

  1. Replace the je.getMessage() inclusion in the Response.Status.BAD_REQUEST error message with a generic error message.
  2. Log the detailed je.getMessage() locally on the server using the existing logger.
Suggested changeset 1
src/main/java/edu/harvard/iq/dataverse/api/SendFeedbackAPI.java

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/src/main/java/edu/harvard/iq/dataverse/api/SendFeedbackAPI.java b/src/main/java/edu/harvard/iq/dataverse/api/SendFeedbackAPI.java
--- a/src/main/java/edu/harvard/iq/dataverse/api/SendFeedbackAPI.java
+++ b/src/main/java/edu/harvard/iq/dataverse/api/SendFeedbackAPI.java
@@ -90,7 +90,8 @@
         } catch (WrappedResponse resp) {
             return resp.getResponse();
         } catch (JsonException je) {
-            return error(Response.Status.BAD_REQUEST, "Invalid JSON; error message: " + je.getMessage());
+            logger.severe("Invalid JSON input: " + je.getMessage());
+            return error(Response.Status.BAD_REQUEST, "Invalid JSON input.");
         }
     }
 
EOF
@@ -90,7 +90,8 @@
} catch (WrappedResponse resp) {
return resp.getResponse();
} catch (JsonException je) {
return error(Response.Status.BAD_REQUEST, "Invalid JSON; error message: " + je.getMessage());
logger.severe("Invalid JSON input: " + je.getMessage());
return error(Response.Status.BAD_REQUEST, "Invalid JSON input.");
}
}

Copilot is powered by AI and may make mistakes. Always verify output.
Unable to commit as this autofix suggestion is now outdated
}
private String sanitizeBody (String body) throws WrappedResponse {
// remove malicious html
String sanitizedBody = body == null ? "" : body.replaceAll("\\<.*?>", "");

Check failure

Code scanning / CodeQL

Polynomial regular expression used on uncontrolled data High

This
regular expression
that depends on a
user-provided value
may run slow on strings starting with '<' and with many repetitions of '<'.

@pdurbin pdurbin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

6.7 here we come! 🚀

@pdurbin

pdurbin commented Jul 17, 2025

Copy link
Copy Markdown
Member

For the record, this pull request originally had lots of merge conflicts:

.github/workflows/container_app_push.yml
.github/workflows/copy_labels.yml
.github/workflows/deploy_beta_testing.yml
.github/workflows/guides_build_sphinx.yml
doc/sphinx-guides/source/_static/admin/dataverse-external-tools.tsv
doc/sphinx-guides/source/_static/api/harvesting-client.json
doc/sphinx-guides/source/api/changelog.rst
doc/sphinx-guides/source/api/native-api.rst
doc/sphinx-guides/source/api/search.rst
doc/sphinx-guides/source/conf.py
doc/sphinx-guides/source/container/running/demo.rst
doc/sphinx-guides/source/developers/classic-dev-env.rst
doc/sphinx-guides/source/developers/tips.rst
doc/sphinx-guides/source/installation/config.rst
doc/sphinx-guides/source/installation/prerequisites.rst
doc/sphinx-guides/source/qa/test-automation.md
doc/sphinx-guides/source/user/appendix.rst
doc/sphinx-guides/source/versions.rst
modules/dataverse-parent/pom.xml
pom.xml
src/main/java/edu/harvard/iq/dataverse/Dataset.java
src/main/java/edu/harvard/iq/dataverse/DatasetFieldServiceBean.java
src/main/java/edu/harvard/iq/dataverse/DatasetFieldType.java
src/main/java/edu/harvard/iq/dataverse/DatasetPage.java
src/main/java/edu/harvard/iq/dataverse/DatasetServiceBean.java
src/main/java/edu/harvard/iq/dataverse/DatasetVersion.java
src/main/java/edu/harvard/iq/dataverse/EjbDataverseEngine.java
src/main/java/edu/harvard/iq/dataverse/FileMetadataVersionsHelper.java
src/main/java/edu/harvard/iq/dataverse/api/AbstractApiBean.java
src/main/java/edu/harvard/iq/dataverse/api/Datasets.java
src/main/java/edu/harvard/iq/dataverse/api/DataverseFeaturedItems.java
src/main/java/edu/harvard/iq/dataverse/api/Dataverses.java
src/main/java/edu/harvard/iq/dataverse/api/Search.java
src/main/java/edu/harvard/iq/dataverse/api/dto/NewDataverseFeaturedItemDTO.java
src/main/java/edu/harvard/iq/dataverse/api/dto/UpdatedDataverseFeaturedItemDTO.java
src/main/java/edu/harvard/iq/dataverse/authorization/AuthenticationServiceBean.java
src/main/java/edu/harvard/iq/dataverse/dataset/DatasetType.java
src/main/java/edu/harvard/iq/dataverse/dataverse/featured/DataverseFeaturedItem.java
src/main/java/edu/harvard/iq/dataverse/dataverse/featured/DataverseFeaturedItemServiceBean.java
src/main/java/edu/harvard/iq/dataverse/engine/command/CommandContext.java
src/main/java/edu/harvard/iq/dataverse/engine/command/impl/AbstractWriteDataverseFeaturedItemCommand.java
src/main/java/edu/harvard/iq/dataverse/engine/command/impl/CreateDataverseFeaturedItemCommand.java
src/main/java/edu/harvard/iq/dataverse/engine/command/impl/DeleteDataverseCommand.java
src/main/java/edu/harvard/iq/dataverse/engine/command/impl/UpdateDataverseFeaturedItemCommand.java
src/main/java/edu/harvard/iq/dataverse/engine/command/impl/UpdateDataverseFeaturedItemsCommand.java
src/main/java/edu/harvard/iq/dataverse/export/ddi/DdiExportUtil.java
src/main/java/edu/harvard/iq/dataverse/harvest/client/HarvesterServiceBean.java
src/main/java/edu/harvard/iq/dataverse/pidproviders/AbstractPidProvider.java
src/main/java/edu/harvard/iq/dataverse/pidproviders/doi/datacite/DataCiteDOIProvider.java
src/main/java/edu/harvard/iq/dataverse/search/IndexServiceBean.java
src/main/java/edu/harvard/iq/dataverse/search/SolrIndexServiceBean.java
src/main/java/edu/harvard/iq/dataverse/settings/FeatureFlags.java
src/main/java/edu/harvard/iq/dataverse/settings/JvmSettings.java
src/main/java/edu/harvard/iq/dataverse/settings/SettingsServiceBean.java
src/main/java/edu/harvard/iq/dataverse/util/FileUtil.java
src/main/java/edu/harvard/iq/dataverse/util/json/JsonParser.java
src/main/java/edu/harvard/iq/dataverse/util/json/JsonPrinter.java
src/main/java/edu/harvard/iq/dataverse/util/json/JsonPrinterHelper.java
src/main/java/propertyFiles/Bundle.properties
src/main/webapp/dataset-versions.xhtml
src/main/webapp/dataset.xhtml
src/main/webapp/metadataFragment.xhtml
src/test/java/edu/harvard/iq/dataverse/api/DatasetsIT.java
src/test/java/edu/harvard/iq/dataverse/api/DataverseFeaturedItemsIT.java
src/test/java/edu/harvard/iq/dataverse/api/DataversesIT.java
src/test/java/edu/harvard/iq/dataverse/api/FilesIT.java
src/test/java/edu/harvard/iq/dataverse/api/RolesIT.java
src/test/java/edu/harvard/iq/dataverse/api/S3AccessIT.java
src/test/java/edu/harvard/iq/dataverse/api/SearchIT.java
src/test/java/edu/harvard/iq/dataverse/api/SendFeedbackApiIT.java
src/test/java/edu/harvard/iq/dataverse/api/UtilIT.java
src/test/java/edu/harvard/iq/dataverse/authorization/AuthenticationServiceBeanTest.java
src/test/java/edu/harvard/iq/dataverse/engine/TestCommandContext.java
src/test/java/edu/harvard/iq/dataverse/engine/command/impl/CreateDataverseFeaturedItemCommandTest.java
src/test/java/edu/harvard/iq/dataverse/util/json/JsonPrinterTest.java

We discussed in Slack and developed a whole plan to fix the master branch (we force-pushed from v6.5 and brought it up to v6.6 with #11649) and re-do the v6.6 release. Now that all that's done, the merge conflicts in the PR are gone! 🎉

@pdurbin pdurbin moved this from In Review 🔎 to Ready for QA ⏩ in IQSS Dataverse Project Jul 17, 2025
@pdurbin pdurbin removed their assignment Jul 17, 2025
@ofahimIQSS ofahimIQSS self-assigned this Jul 17, 2025
@ofahimIQSS ofahimIQSS moved this from Ready for QA ⏩ to QA ✅ in IQSS Dataverse Project Jul 17, 2025
@ofahimIQSS

Copy link
Copy Markdown
Contributor Author

merging!

@ofahimIQSS
ofahimIQSS merged commit f3e6581 into master Jul 17, 2025
10 of 12 checks passed
@github-project-automation github-project-automation Bot moved this from QA ✅ to Merged 🚀 in IQSS Dataverse Project Jul 17, 2025
@ofahimIQSS ofahimIQSS removed their assignment Jul 17, 2025
@pdurbin pdurbin moved this from Merged 🚀 to Done 🧹 in IQSS Dataverse Project Jul 22, 2025
@cmbz cmbz added the FY26 Sprint 4 FY26 Sprint 4 (2025-08-13 - 2025-08-27) label Aug 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FY26 Sprint 4 FY26 Sprint 4 (2025-08-13 - 2025-08-27)

Projects

Status: Done 🧹

Development

Successfully merging this pull request may close these issues.