🔒 Fixed admin forms defaulting to GET method (#20810)
ref https://linear.app/tryghost/issue/ENG-1497/admin-signin-signup-and-setup-forms-default-to-get - If method is not specified, the form will default to GET, which is incorrect - This commit sets the method to POST and action to javascript:void(0) to prevent the form from submitting via GET if JavaScript is disabled or not fully loaded yet
This commit is contained in:
parent
c0471f0c28
commit
6d46dc26c7
@ -6,7 +6,7 @@
|
|||||||
<p>All over the world, people have started 3,000,000+ incredible sites with Ghost. Today, we’re starting yours.</p>
|
<p>All over the world, people have started 3,000,000+ incredible sites with Ghost. Today, we’re starting yours.</p>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<form id="setup" class="gh-flow-form">
|
<form id="setup" method="post" action="javascript:void(0)" class="gh-flow-form">
|
||||||
<GhFormGroup @errors={{this.errors}} @hasValidated={{this.hasValidated}} @property="blogTitle">
|
<GhFormGroup @errors={{this.errors}} @hasValidated={{this.hasValidated}} @property="blogTitle">
|
||||||
<label for="blog-title">Site title</label>
|
<label for="blog-title">Site title</label>
|
||||||
<span class="gh-input-icon gh-icon-content">
|
<span class="gh-input-icon gh-icon-content">
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
</header>
|
</header>
|
||||||
</div>
|
</div>
|
||||||
{{else}}
|
{{else}}
|
||||||
<form id="login" class="gh-signin" novalidate="novalidate" {{on "submit" (perform this.validateAndAuthenticateTask)}}>
|
<form id="login" method="post" action="javascript:void(0)" class="gh-signin" novalidate="novalidate" {{on "submit" (perform this.validateAndAuthenticateTask)}}>
|
||||||
<header>
|
<header>
|
||||||
<div class="gh-site-icon" style={{site-icon-style}}></div>
|
<div class="gh-site-icon" style={{site-icon-style}}></div>
|
||||||
<h1>{{this.config.blogTitle}}</h1>
|
<h1>{{this.config.blogTitle}}</h1>
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<h1>Create your account.</h1>
|
<h1>Create your account.</h1>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<form id="signup" class="gh-signup" novalidate="novalidate" {{on "submit" this.submit}}>
|
<form id="signup" method="post" action="javascript:void(0)" class="gh-signup" novalidate="novalidate" {{on "submit" this.submit}}>
|
||||||
<GhFormGroup @errors={{this.signupDetails.errors}} @hasValidated={{this.signupDetails.hasValidated}} @property="name">
|
<GhFormGroup @errors={{this.signupDetails.errors}} @hasValidated={{this.signupDetails.hasValidated}} @property="name">
|
||||||
<label for="name">Full name</label>
|
<label for="name">Full name</label>
|
||||||
<span class="gh-input-icon gh-icon-user">
|
<span class="gh-input-icon gh-icon-user">
|
||||||
|
Loading…
Reference in New Issue
Block a user