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

Referrers, referrals #506

Merged
merged 1 commit into from
Nov 28, 2023
Merged

Referrers, referrals #506

merged 1 commit into from
Nov 28, 2023

Conversation

Lex-Ai
Copy link

@Lex-Ai Lex-Ai commented Nov 28, 2023

No description provided.

@@ -1,9 +1,9 @@
export const routeRegex = {
PostsIndex: /^\/(@[\w\.\d-]+)\/feed\/?$/,
UserProfile1: /^\/(@[\w\.\d-]+)\/?$/,
UserProfile2: /^\/(@[\w\.\d-]+)\/(blog|posts|comments|reputation|mentions|created|recent-replies|discussions|feed|followed|followers|sponsors|settings)\/??(?:&?[^=&]*=[^=&]*)*$/,
UserProfile2: /^\/(@[\w\.\d-]+)\/(blog|posts|comments|reputation|mentions|created|recent-replies|discussions|feed|followed|followers|sponsors|referrals|settings)\/??(?:&?[^=&]*=[^=&]*)*$/,

Check failure

Code scanning / CodeQL

Inefficient regular expression High

This part of the regular expression may cause exponential backtracking on strings starting with '/@-/feed=' and containing many repetitions of '%='.
<Icon name="hf/hf5" size="2x" />
{' '}{tt('g.referral_link')}{' - '}
<span style={{border: '1px solid lightgray', padding: '5px', borderRadius: '3px'}}>
<a target="_blank" href={refUrl}>{refUrl}</a>

Check warning

Code scanning / CodeQL

Potentially unsafe external link Medium

External links without noopener/noreferrer are a potential security risk.
@Lex-Ai Lex-Ai merged commit f5ff51b into dev Nov 28, 2023
2 of 3 checks passed
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.

2 participants