Skip to content

Make assay/sample publish confirmation actions POST-only#6691

Merged
labkey-tchad merged 2 commits intodevelopfrom
fb_postOnlyConfirmActions
May 23, 2025
Merged

Make assay/sample publish confirmation actions POST-only#6691
labkey-tchad merged 2 commits intodevelopfrom
fb_postOnlyConfirmActions

Conversation

@labkey-tchad
Copy link
Copy Markdown
Member

Rationale

Confirmation actions often require significant context from the source page. Supporting GET requests for them is virtually useless and trips up the crawler.

java.lang.NullPointerException: Cannot invoke "org.labkey.api.exp.api.ExpProtocol.getName()" because "protocol" is null
Current URL: /Dataset%20Download%20Test/publish-assayPublishConfirm.view?userId=%22%3E%27%3E%27%22%3C%2Fscript%3E%3Cimg%20src%3D%22x%22%20onerror%3D%22alert(%278(%27)%22%3E&rowId=25&_dc=371&.lastFilter=true&pk=2&webPartId=84&schemaName=assay&rootset=1&t=sitegroups&type=Deprecated
Current user: teamcity@labkey.test
java.lang.NullPointerException: Cannot invoke "org.labkey.api.exp.api.ExpProtocol.getName()" because "protocol" is null
	at org.labkey.api.assay.AssayProtocolSchema.schemaName(AssayProtocolSchema.java:137) ~[api-25.6-SNAPSHOT.jar:?]
	at org.labkey.api.assay.AssayProtocolSchema.<init>(AssayProtocolSchema.java:142) ~[api-25.6-SNAPSHOT.jar:?]
	at org.labkey.assay.TSVProtocolSchema.<init>(TSVProtocolSchema.java:79) ~[assay-25.6-SNAPSHOT.jar:?]
	at org.labkey.assay.TsvAssayProvider.createProtocolSchema(TsvAssayProvider.java:316) ~[assay-25.6-SNAPSHOT.jar:?]
	at org.labkey.study.assay.AssayPublishConfirmAction.getUserSchema(AssayPublishConfirmAction.java:162) ~[study-25.6-SNAPSHOT.jar:?]
	at org.labkey.study.assay.AssayPublishConfirmAction.getUserSchema(AssayPublishConfirmAction.java:50) ~[study-25.6-SNAPSHOT.jar:?]
	at org.labkey.api.study.publish.AbstractPublishConfirmAction.getView(AbstractPublishConfirmAction.java:231) ~[api-25.6-SNAPSHOT.jar:?]
	at org.labkey.study.assay.AssayPublishConfirmAction.getView(AssayPublishConfirmAction.java:295) ~[study-25.6-SNAPSHOT.jar:?]
	at org.labkey.study.assay.AssayPublishConfirmAction.getView(AssayPublishConfirmAction.java:50) ~[study-25.6-SNAPSHOT.jar:?]
	at org.labkey.api.action.FormViewAction.handleRequest(FormViewAction.java:110) ~[api-25.6-SNAPSHOT.jar:?]

Related Pull Requests

  • N/A

Changes

  • Make publish-sampleTypePublishConfirm and publish-assayPublishConfirm actions POST-only

They require more context than can be expected from a GET and trip up the crawler
@labkey-tchad labkey-tchad requested a review from a team May 22, 2025 19:03
Comment thread study/src/org/labkey/study/assay/AssayPublishConfirmAction.java
@labkey-tchad labkey-tchad requested a review from labkey-nicka May 23, 2025 01:33
@labkey-tchad labkey-tchad merged commit 6ea0096 into develop May 23, 2025
11 checks passed
@labkey-tchad labkey-tchad deleted the fb_postOnlyConfirmActions branch May 23, 2025 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants