Open
Description
Description
In Gitea v1.23, when using workflow_dispatch in actions, the number input type is not properly validated. It accepts string values instead of enforcing numeric input.
Gitea Version
v1.23
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
Define a workflow with an input of type number:
on:
push:
workflow_dispatch:
inputs:
number_required_1:
description: 'number-1 '
type: number
required: true
default: '100'
number_required_2:
description: 'number-2'
type: number
required: true
default: '100'
number_required_3:
description: 'number-3'
type: number
required: true
default: '100'
jobs:
build:
runs-on: ubuntu-latest
steps:
- run: echo "Demo non-main branch"
- run: env | grep inputs
Trigger the workflow manually and enter a string value (e.g., "abc").
The workflow proceeds without validation, even though build_number is expected to be a number.
-> Action logs:
inputs_number_required_3=100
inputs_number_required_2=abc
inputs_number_required_1=100
Trigger the workflow manually and enter a string value (e.g., "abc").
The workflow proceeds without validation, even though build_number is expected to be a number.
Operating System
ubuntu 22.04 LTS
How are you running Gitea?
in docker
Database
None