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

Iframely rel review #545

Merged
merged 2 commits into from
Jul 9, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
rename isAllowedApp to isAllowed
nleush committed Jul 9, 2024
commit 3d507f49f6320152d846f5ae7da09a0390e3317d
6 changes: 3 additions & 3 deletions plugins/links/utils.js
Original file line number Diff line number Diff line change
@@ -90,12 +90,12 @@ export default {
// Filter empty.
rels = rels.filter(i => i);

var isAllowedApp = whitelistRecord.isAllowed('html-meta.iframely') // New check.
var isAllowed = whitelistRecord.isAllowed('html-meta.iframely') // New check.
|| whitelistRecord.isAllowed('iframely.app'); // Old check

// If no additional rels specified, try add 'app'.
if (!rels.some(rel => CONFIG.REL_GROUPS && CONFIG.REL_GROUPS.includes(rel))) {
if (isAllowedApp
if (isAllowed
&& /iframely/i.test(key)
|| (appname && key.indexOf(appname) === 0)) {
// Allow <link rel="iframely" ....
@@ -127,7 +127,7 @@ export default {
var tags = whitelistRecord.getQATags(rels);
var isAllowedByRels = tags.indexOf('allow') > -1;

if (!isAllowedApp && !isAllowedByRels) {
if (!isAllowed && !isAllowedByRels) {
return [];
}