Skip to content

PM-3087 virus scan fix#7175

Merged
vas3a merged 3 commits intodevelopfrom
PM-3087_virus-scan-fix
Feb 13, 2026
Merged

PM-3087 virus scan fix#7175
vas3a merged 3 commits intodevelopfrom
PM-3087_virus-scan-fix

Conversation

@vas3a
Copy link
Collaborator

@vas3a vas3a commented Feb 13, 2026

check "virusScan" flag when checking for submission status in my submissions

@vas3a vas3a merged commit 3f18f70 into develop Feb 13, 2026
2 checks passed
@vas3a vas3a deleted the PM-3087_virus-scan-fix branch February 13, 2026 21:08
const formatDate = date => moment(+new Date(date)).format('MMM DD, YYYY hh:mm A');
const onDownloadSubmission = onDownload.bind(1, submissionObject.id);
const safeForDownloadCheck = safeForDownload(submissionObject.url);
const safeForDownloadCheck = safeForDownload(submissionObject);

Choose a reason for hiding this comment

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

[❗❗ correctness]
The safeForDownload function now receives the entire submissionObject instead of just the url. Ensure that safeForDownload is designed to handle the full object and that it uses the necessary properties correctly. This change could potentially introduce issues if safeForDownload is not updated accordingly.


if (needReload === false && mySubmissions) {
if (mySubmissions.find(item => safeForDownload(item.url) !== true)) {
if (mySubmissions.find(item => safeForDownload(item) !== true)) {

Choose a reason for hiding this comment

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

[❗❗ correctness]
The safeForDownload function now takes an item object instead of item.url. Ensure that safeForDownload is designed to handle the entire object and not just a URL string. If safeForDownload expects a specific property from the object, verify that it is correctly accessing that property.

export function safeForDownload(url) {
if (url == null) return 'Download link unavailable';
export function safeForDownload(submission) {
if (submission == null || !submission.url) return 'Download link unavailable';

Choose a reason for hiding this comment

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

[💡 readability]
The check submission == null || !submission.url could be simplified to !submission || !submission.url for better readability.


if (url.toLowerCase().indexOf('submissions-quarantine/') !== -1) {
const { url } = submission;
if (url.toLowerCase().indexOf('submissions-quarantine/') !== -1 || submission.virusScan === false) {

Choose a reason for hiding this comment

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

[⚠️ maintainability]
The condition submission.virusScan === false is redundant with the condition !submission.virusScan in the next block. Consider consolidating these checks for clarity and maintainability.

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.

1 participant