Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Merge pull request from GHSA-36gx-9q6h-g429
Advisory fix 1 - notify user that his account is locked through email
- Loading branch information
Showing
6 changed files
with
372 additions
and
157 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
157 changes: 157 additions & 0 deletions
157
vantage6-server/vantage6/server/templates/mail/blocked_account.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,157 @@ | ||
| <!-- | ||
| HTML Email Starter Kit | ||
| Documentation: https://github.com/timothylong/html-email-starter-kit | ||
| --> | ||
| <!DOCTYPE html> | ||
| <html> | ||
| <head> | ||
| <meta charset="UTF-8"> | ||
| <meta name="viewport" content="width=device-width" initial-scale="1"> | ||
| <!--[if !mso]> | ||
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
| <![endif]--> | ||
| <meta name="x-apple-disable-message-reformatting"> | ||
| <title></title> | ||
| <!--[if mso]> | ||
| <style> | ||
| * { font-family: sans-serif !important; } | ||
| </style> | ||
| <![endif]--> | ||
| <!--[if !mso]><!--> | ||
| <!-- Insert font reference, e.g. <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700" rel="stylesheet"> --> | ||
| <!--<![endif]--> | ||
| <style> | ||
| *, | ||
| *:after, | ||
| *:before { | ||
| -webkit-box-sizing: border-box; | ||
| -moz-box-sizing: border-box; | ||
| box-sizing: border-box; | ||
| } | ||
| * { | ||
| -ms-text-size-adjust: 100%; | ||
| -webkit-text-size-adjust: 100%; | ||
| } | ||
| html, | ||
| body, | ||
| .document { | ||
| font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; | ||
| font-size: 1.05em; | ||
| width: 100% !important; | ||
| height: 100% !important; | ||
| margin: 0; | ||
| padding: 0; | ||
| } | ||
| body { | ||
| -webkit-font-smoothing: antialiased; | ||
| -moz-osx-font-smoothing: grayscale; | ||
| text-rendering: optimizeLegibility; | ||
| } | ||
| div[style*="margin: 16px 0"] { | ||
| margin: 0 !important; | ||
| } | ||
| table, | ||
| td { | ||
| mso-table-lspace: 0pt; | ||
| mso-table-rspace: 0pt; | ||
| } | ||
| table { | ||
| border-spacing: 0; | ||
| border-collapse: collapse; | ||
| table-layout: fixed; | ||
| margin: 0 auto; | ||
| } | ||
| img { | ||
| -ms-interpolation-mode: bicubic; | ||
| max-width: 100%; | ||
| border: 0; | ||
| } | ||
| *[x-apple-data-detectors] { | ||
| color: inherit !important; | ||
| text-decoration: none !important; | ||
| } | ||
| .x-gmail-data-detectors, | ||
| .x-gmail-data-detectors *, | ||
| .aBn { | ||
| border-bottom: 0 !important; | ||
| cursor: default !important; | ||
| } | ||
| .btn { | ||
| -webkit-transition: all 200ms ease; | ||
| transition: all 200ms ease; | ||
| } | ||
| .btn:hover { | ||
| background-color: dodgerblue; | ||
| } | ||
| @media screen and (max-width: 750px) { | ||
| .container { | ||
| width: 100%; | ||
| margin: auto; | ||
| } | ||
| .stack { | ||
| display: block; | ||
| width: 100%; | ||
| max-width: 100%; | ||
| } | ||
| } | ||
| </style> | ||
| </head> | ||
| <body> | ||
| <div style="display: none; max-height: 0px; overflow: hidden;"> | ||
| <!-- Preheader message here --> | ||
| </div> | ||
| <div style="display: none; max-height: 0px; overflow: hidden;"> ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ </div> | ||
| <table style="background-color: #fff;" role="presentation" aria-hidden="true" cellspacing="0" cellpadding="0" border="0" align="center" class="document"> | ||
| <tr> | ||
| <td valign="top"> | ||
| <table role="presentation" aria-hidden="true" cellspacing="0" cellpadding="0" border="0" align="center" width="750" class="container"> | ||
| <tr> | ||
| <td> | ||
| <table role="presentation" aria-hidden="true" cellspacing="0" cellpadding="0" border="0" align="center" width="100%"> | ||
| <tr> | ||
| <td width=250></td> | ||
| <td style="padding:20px;"> | ||
| <img src="https://raw.githubusercontent.com/IKNL/guidelines/master/resources/logos/vantage6.png" width=250> | ||
| </td> | ||
| <td width=250></td> | ||
| </tr> | ||
| <tr style="background-color:#f9f9f9;" width="100%"> | ||
| <td colspan=3 style="padding:40px; color:#0f497b;"> | ||
|
|
||
| Dear <strong>{{firstname}}</strong>, | ||
|
|
||
| <p> | ||
| After {{number_of_allowed_attempts}} failed login attempts your user account has been blocked.<br/> | ||
| <ul> | ||
| <li>Source IP: {{ip}}</li> | ||
| <li>Last attempt at: {{time}} (UTC)</li> | ||
| </ul> | ||
| </p> | ||
| <p> | ||
| Your account will be unlocked in {{time_remaining}} minutes. Please wait or reactivate your account via email. | ||
| </p> | ||
| <p>Sincerely, <br/>vantage6 Support Team</p> | ||
| </td> | ||
| </tr> | ||
| </table> | ||
| </td> | ||
| </tr> | ||
| </table> | ||
| <table role="presentation" aria-hidden="true" cellspacing="0" cellpadding="0" border="0" align="center" width="750" class="container"> | ||
| <tr style="font-size: .6em;"> | ||
| <td style="padding-top:20px; padding-bottom: 20px;"> | ||
| <a style="color:#0f497b; font-weight: bold;" href="https://vantage6.ai">vantage6.ai</a> | ||
| </td> | ||
| <td style="padding-top:20px; padding-bottom: 20px;text-align: center;"> | ||
| <a style="color:#0f497b; font-weight: bold;" href="https://discord.gg/yAyFf6Y">Join our Discord channel</a> | ||
| </td > | ||
| <td style="padding-top:20px; padding-bottom: 20px;text-align: right;"> | ||
| <a style="color:#0f497b; font-weight: bold;" href="mailto:support@vantage6.ai">support@vantage6.ai</a> | ||
| </td> | ||
| </tr> | ||
| </table> | ||
| </td> | ||
| </tr> | ||
| </table> | ||
| </body> | ||
| </html> |
10 changes: 10 additions & 0 deletions
10
vantage6-server/vantage6/server/templates/mail/blocked_account.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| Dear {{firstname}}, | ||
|
|
||
| After {{number_of_allowed_attempts}} failed login attempts your user account has been blocked. | ||
|
|
||
| Source IP: {{ip}} | ||
| Last attempt at: {{time}} (UTC) | ||
|
|
||
| Your account will be unlocked in {{time_remaining}} minutes. Please wait or reactivate your account via email. | ||
|
|
||
| Sincerely, vantage6 Support Team |
Oops, something went wrong.