Merge pull request #9231 from jakemcdermott/fix-9229

Prevent url smashing from prompted inputs

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
softwarefactory-project-zuul[bot] 2021-02-04 16:44:24 +00:00 committed by GitHub
commit 47de2ddcb5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 3 deletions

View File

@ -84,7 +84,11 @@ function CredentialPasswordsStep({ launchConfig, i18n }) {
}
return (
<Form>
<Form
onSubmit={e => {
e.preventDefault();
}}
>
{showcredentialPasswordSsh && (
<PasswordField
id="launch-ssh-password"

View File

@ -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

View File

@ -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 (