-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
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
feat(v2): prevent using remote image urls in showcase #3560
Conversation
`User image should be self-hosted in /img/users folder. This was not the case for ${user.image}`, | ||
); | ||
} | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seen this check just after, but does not. look like the appropriate place to do it.
Deploy preview for docusaurus-2 failed. Built with commit d320339 https://app.netlify.com/sites/docusaurus-2/deploys/5f7f0fab98c3b3000967c3c2 |
Deploy preview for docusaurus-2 ready! Built with commit 4c5f220 |
website/src/data/users.js
Outdated
if ( | ||
!user.preview || | ||
user.preview.startsWith('http') || | ||
user.preview.startsWith('//') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CI fails because of this condition:
4:20:00 PM: TypeError: user.preview.startsWith is not a function
4:20:00 PM: at Array.forEach (<anonymous>)
4:20:00 PM: (undefined) TypeError: user.preview.startsWith is not a function
4:20:00 PM: at module.exports.users.forEach.user (main:35114:6781)
4:20:00 PM: at Array.forEach (<anonymous>)
4:20:00 PM: at Module.<anonymous> (main:35114:6735)
4:20:00 PM: at __webpack_require__ (main:21:30)
4:20:00 PM: at Promise.resolve.then (main:13011:7767)
Motivation
Ensure we never accept a remote url as showcase image on Docusaurus sites, as remote URLs are likely to break over time.
(example: #3556 (review))