gitweb: Split validate_input into validate_pathname and validate_refname