Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
Block Explorer UI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hive
Block Explorer UI
Commits
539628be
Commit
539628be
authored
2 months ago
by
Dima Rifai
Committed by
mcfarhat
2 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#412
- Validate Account in route starts with @
parent
0e95c8aa
No related branches found
No related tags found
1 merge request
!511
Delrifai/#412 verify account starts with @
Pipeline
#112402
canceled
2 months ago
Stage: build
Stage: test
Stage: test-report-aggregate
Stage: cleanup
Changes
1
Pipelines
4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pages/[accountName].tsx
+2
-1
2 additions, 1 deletion
pages/[accountName].tsx
with
2 additions
and
1 deletion
pages/[accountName].tsx
+
2
−
1
View file @
539628be
...
...
@@ -283,10 +283,11 @@ export default function Account() {
?
router
.
query
.
accountName
[
0
]
// If it's an array, get the first element
:
router
.
query
.
accountName
;
// Otherwise, treat it as a string directly
if
(
routeAccountName
&&
!
routeAccountName
.
startsWith
(
"
@
"
)
||
!
accountNameFromRoute
)
if
(
routeAccountName
&&
!
routeAccountName
.
startsWith
(
"
@
"
))
{
return
<
ErrorPage
/>;
}
if
(
!
accountDetails
)
{
return
(
<
Loader2
className
=
"animate-spin mt-1 text-black dark:text-white h-12 w-12 ml-3 ..."
/>
...
...
This diff is collapsed.
Click to expand it.
Dima Rifai
@delrifai
mentioned in issue
#422 (closed)
·
2 months ago
mentioned in issue
#422 (closed)
mentioned in issue #422
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment