Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed: Every New Broadcast should be Broadcasted to Subscribers #1128

Merged
merged 10 commits into from
Aug 10, 2024

Conversation

BHS-Harish
Copy link
Contributor

Issue that this pull request solves

Closes: #1125

Proposed changes

As soon as a broadcast gets approved by the admins, it should broadcast it to all the email subscribers. This will help students to be updated with any new opportunities posted on the site.

Types of changes

Put an x in the boxes that apply

  • New feature (non-breaking change which adds functionality)

Screenshots

image

Other information

Any other information that is important to this pull request


const [err, result] = await to(Broadcast.findOneAndUpdate({ _id : req.body.id }, { $set : data }));
const [err, result] = await to(Broadcast.findOneAndUpdate({ _id: req.body.id }, { $set: data }));

Check failure

Code scanning / CodeQL

Database query built from user-controlled sources High

This query object depends on a
user-provided value
.

const [err, result] = await to(Broadcast.findOneAndUpdate({ _id : req.body.id }, { $set : data }));
const [err, result] = await to(Broadcast.findOneAndUpdate({ _id: req.body.id }, { $set: data }));

Check failure

Code scanning / CodeQL

Database query built from user-controlled sources High

This query object depends on a
user-provided value
.
from: `HITK TECH Community <${config.EMAIL_USER}>`,
to: "[email protected]",
subject: `New Broadcast: ${data?.title} 😍`,
html: broadcastPublishMailTemplate(data),

Check failure

Code scanning / CodeQL

Client-side cross-site scripting High

HTML injection vulnerability due to
user-provided value
.
@BHS-Harish
Copy link
Contributor Author

Hey @Kajol-Kumari

Please review it and merge it.

The PR failed due to some failures but those are no affect our functionality

@@ -703,7 +702,7 @@ a > span {
}
}

@media screen and (max-width: 510px) {
Copy link
Member

Choose a reason for hiding this comment

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

this change shouldn't have come here, make sure to pull the latest master, rest looks fine

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry for that.

Copy link
Member

Choose a reason for hiding this comment

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

Its okay, we are all learning 😊

@Kajol-Kumari Kajol-Kumari added level3 New features, major bug fixing. gssoc GSSoC'24 Label labels Aug 10, 2024
@Kajol-Kumari Kajol-Kumari merged commit 6692aa6 into HITK-TECH-Community:main Aug 10, 2024
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gssoc GSSoC'24 Label level3 New features, major bug fixing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Backend] Every New Broadcast should be Broadcasted to Subscribers
2 participants