Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
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
Main
Synchronet
Commits
be0c7116
Commit
be0c7116
authored
4 years ago
by
Rob Swindell
Browse files
Options
Downloads
Patches
Plain Diff
Use system.min/max_password_length properties
parent
66191a24
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
webv4/pages/.examples/000-register.xjs
+4
-4
4 additions, 4 deletions
webv4/pages/.examples/000-register.xjs
webv4/root/api/register.ssjs
+2
-2
2 additions, 2 deletions
webv4/root/api/register.ssjs
with
6 additions
and
6 deletions
webv4/pages/.examples/000-register.xjs
+
4
−
4
View file @
be0c7116
...
...
@@ -67,10 +67,10 @@
<?xjs write(locale.strings.page_register.input_password); ?>
</label>
<span title="<?xjs write(locale.strings.page_register.label_field_required); ?>" class="glyphicon glyphicon-asterisk"></span>
<input type="password" data-minlength="
4" maxlength="8
" class="form-control" id="password1" name="password1" placeholder="<?xjs write(locale.strings.page_register.input_password); ?>" required>
<input type="password" data-minlength="
<?xjs write(system.min_password_length) ?>" maxlength="<?xjs write(system.max_password_length) ?>
" class="form-control" id="password1" name="password1" placeholder="<?xjs write(locale.strings.page_register.input_password); ?>" required>
<span class="help-block">
<?xjs write(format(locale.strings.page_register.help_text_minimum_characters, s
ettings.minimum
_password_length)); ?>,
<?xjs write(format(locale.strings.page_register.help_text_maximum_characters,
LEN_PASS
)); ?>
<?xjs write(format(locale.strings.page_register.help_text_minimum_characters, s
ystem.min
_password_length)); ?>,
<?xjs write(format(locale.strings.page_register.help_text_maximum_characters,
system.max_password_length
)); ?>
</span>
</div>
<div class="form-group">
...
...
@@ -78,7 +78,7 @@
<?xjs write(locale.strings.page_register.input_password_confirm); ?>
</label>
<span title="<?xjs write(locale.strings.page_register.label_field_required); ?>" class="glyphicon glyphicon-asterisk"></span>
<input type="password" data-minlength="
4" maxlength="8
" class="form-control" id="password2" name="password2" placeholder="<?xjs write(locale.strings.page_register.input_password_confirm); ?>" data-match="#password1" required>
<input type="password" data-minlength="
<?xjs write(system.min_password_length) ?>" maxlength="<?xjs write(system.max_password_length) ?>
" class="form-control" id="password2" name="password2" placeholder="<?xjs write(locale.strings.page_register.input_password_confirm); ?>" data-match="#password1" required>
</div>
<div class="form-group">
...
...
This diff is collapsed.
Click to expand it.
webv4/root/api/register.ssjs
+
2
−
2
View file @
be0c7116
...
...
@@ -101,8 +101,8 @@ if (!valid_param('alias', MIN_ALIAS, LEN_ALIAS) || !system.check_name(clean_para
if
(
!
Request
.
has_param
(
'
password1
'
)
||
!
Request
.
has_param
(
'
password2
'
)
||
clean_param
(
'
password1
'
)
!=
clean_param
(
'
password2
'
))
{
reply
.
errors
.
push
(
locale
.
strings
.
api_register
.
error_password_mismatch
);
}
else
if
(
!
in_range
(
clean_param
(
'
password1
'
).
length
,
s
ettings
.
minimum
_password_length
,
LEN_PASS
))
{
reply
.
errors
.
push
(
format
(
locale
.
strings
.
api_register
.
error_password_length
,
s
ettings
.
minimum
_password_length
,
LEN_PASS
));
}
else
if
(
!
in_range
(
clean_param
(
'
password1
'
).
length
,
s
ystem
.
min
_password_length
,
system
.
max_password_length
))
{
reply
.
errors
.
push
(
format
(
locale
.
strings
.
api_register
.
error_password_length
,
s
ystem
.
min
_password_length
,
system
.
max_password_length
));
}
else
{
prepUser
.
password
=
clean_param
(
'
password1
'
);
}
...
...
This diff is collapsed.
Click to expand it.
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