Forms with default action wrongly submit to "/"

Open
#218 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
python
Domain
testing

Research direction

Start at the form-submission/request-building entry point that parses HTML forms and reproduce the minimal method="post" case from the issue. Verify that an omitted action uses the current form URL rather than "/", and add or run coverage for that behavior.

Written by the indexing model from the issue text.

Description

Eg, a form like:

<form method="post">....

would get parsed out as a form with "/" as action url but instead the current url should be the action url. as per the html5 spec at https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#form-submission-algorithm

  1. If action is the empty string, let action be the URL of the form document.
Dominant language
Python
Stars
346
Forks
113
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Pylons/webtest

All issues in Pylons/webtest

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.