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

changed the innerHTML with textContent for security reasons #10105

Conversation

ronibhakta1
Copy link
Contributor

Closes #10097
Hey @jimchamp i have made the changes in innerHTML with textContent for security reasons as you mentioned.

Technical

changes in the team.js file to increase the security.

Testing

no build errors and no other syntactical errors. all changes are preferable as per the documentations

Screenshot

Stakeholders

@github-actions github-actions bot added the Priority: 2 Important, as time permits. [managed] label Dec 2, 2024
Copy link
Collaborator

@jimchamp jimchamp left a comment

Choose a reason for hiding this comment

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

Thanks @ronibhakta1! I've confirmed that everything is working.

Happy to merge this once the commented code on lines 134-137 are removed.

Comment on lines 134 to 137
// memberRole.classList = 'description__role';
// memberRole.innerHTML = `${role}`;
// memberRole.textContent = `${role}`;
// memberDepartment.classList = 'description__department';
// memberDepartment.innerHTML = `${member.departments}`;
// memberDepartment.textContent = `${member.departments}`;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you remove these comments altogether?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah sure i will update you with the changes

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can you remove these comments altogether?

hey @jimchamp i made the required changes you can check that out !

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.

Project coverage is 17.13%. Comparing base (347bff9) to head (0f5aece).
Report is 120 commits behind head on master.

Files with missing lines Patch % Lines
openlibrary/plugins/openlibrary/js/team.js 0.00% 6 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master   #10105   +/-   ##
=======================================
  Coverage   17.12%   17.13%           
=======================================
  Files          89       89           
  Lines        4752     4792   +40     
  Branches      831      845   +14     
=======================================
+ Hits          814      821    +7     
- Misses       3428     3450   +22     
- Partials      510      521   +11     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@jimchamp jimchamp left a comment

Choose a reason for hiding this comment

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

Thanks @ronibhakta1!

@jimchamp jimchamp merged commit f20a00f into internetarchive:master Dec 4, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: 2 Important, as time permits. [managed]
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update team page JavaScript to prevent XSS
3 participants