Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
plausible-analytics
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
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
varac-projects
plausible-analytics
Commits
09df65d5
Commit
09df65d5
authored
4 years ago
by
Uku Taht
Browse files
Options
Downloads
Patches
Plain Diff
Improve password policy
parent
0fb8f09b
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/plausible/auth/user.ex
+1
-0
1 addition, 0 deletions
lib/plausible/auth/user.ex
lib/plausible_web/templates/auth/activate.html.eex
+1
-1
1 addition, 1 deletion
lib/plausible_web/templates/auth/activate.html.eex
with
2 additions
and
1 deletion
lib/plausible/auth/user.ex
+
1
−
0
View file @
09df65d5
...
@@ -34,6 +34,7 @@ defmodule Plausible.Auth.User do
...
@@ -34,6 +34,7 @@ defmodule Plausible.Auth.User do
|>
cast
(
attrs
,
@required
)
|>
cast
(
attrs
,
@required
)
|>
validate_required
(
@required
)
|>
validate_required
(
@required
)
|>
validate_length
(
:password
,
min:
6
,
message:
"has to be at least 6 characters"
)
|>
validate_length
(
:password
,
min:
6
,
message:
"has to be at least 6 characters"
)
|>
validate_length
(
:password
,
max:
64
,
message:
"cannot be longer than 64 characters"
)
|>
validate_confirmation
(
:password
)
|>
validate_confirmation
(
:password
)
|>
hash_password
()
|>
hash_password
()
|>
change
(
trial_expiry_date:
trial_expiry
())
|>
change
(
trial_expiry_date:
trial_expiry
())
...
...
This diff is collapsed.
Click to expand it.
lib/plausible_web/templates/auth/activate.html.eex
+
1
−
1
View file @
09df65d5
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
<div
class=
"mt-12 flex items-stretch flex-grow"
>
<div
class=
"mt-12 flex items-stretch flex-grow"
>
<div>
<div>
<%=
text_input
f
,
:code
,
class:
"tracking-widest font-medium shadow-sm focus:ring-indigo-500 focus:border-indigo-500 block w-36 px-8 border-gray-300 dark:border-gray-500 rounded-l-md dark:text-gray-200 dark:bg-gray-900"
,
oninput:
"this.value=this.value.replace(/[^0-9]/g, ''); if (this.value.length >= 4) document.getElementById('submit').focus()"
,
onclick:
"this.select();"
,
maxlength:
"4"
,
placeholder:
"••••"
,
style:
"letter-spacing: 10px;"
%>
<%=
text_input
f
,
:code
,
class:
"tracking-widest font-medium shadow-sm focus:ring-indigo-500 focus:border-indigo-500 block w-36 px-8 border-gray-300 dark:border-gray-500 rounded-l-md dark:text-gray-200 dark:bg-gray-900"
,
oninput:
"this.value=this.value.replace(/[^0-9]/g, ''); if (this.value.length >= 4) document.getElementById('submit').focus()"
,
onclick:
"this.select();"
,
maxlength:
"4"
,
placeholder:
"••••"
,
style:
"letter-spacing: 10px;"
,
required:
"required"
%>
</div>
</div>
<button
id=
"submit"
class=
"button rounded-l-none"
>
Activate
→
</button>
<button
id=
"submit"
class=
"button rounded-l-none"
>
Activate
→
</button>
</div>
</div>
...
...
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