Skip to content

Commit

Permalink
Merge pull request #9231 from jakemcdermott/fix-9229
Browse files Browse the repository at this point in the history
Prevent url smashing from prompted inputs

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
  • Loading branch information
2 parents 54d63ee + 14686e8 commit 47de2dd
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,11 @@ function CredentialPasswordsStep({ launchConfig, i18n }) {
}

return (
<Form>
<Form
onSubmit={e => {
e.preventDefault();
}}
>
{showcredentialPasswordSsh && (
<PasswordField
id="launch-ssh-password"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ const FieldHeader = styled.div`

function OtherPromptsStep({ launchConfig, i18n }) {
return (
<Form>
<Form
onSubmit={e => {
e.preventDefault();
}}
>
{launchConfig.ask_job_type_on_launch && <JobTypeField i18n={i18n} />}
{launchConfig.ask_limit_on_launch && (
<FormField
Expand Down
6 changes: 5 additions & 1 deletion awx/ui_next/src/components/LaunchPrompt/steps/SurveyStep.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ function SurveyStep({ surveyConfig, i18n }) {
float: NumberField,
};
return (
<Form>
<Form
onSubmit={e => {
e.preventDefault();
}}
>
{surveyConfig.spec.map(question => {
const Field = fieldTypes[question.type];
return (
Expand Down

0 comments on commit 47de2dd

Please sign in to comment.