reddit/reddit — pull request #730 by buddydvd (2013-04-04 09:04:33+00:00)
Title: Fixes bug that prevents generation of new captcha iden for failed calls to VCaptcha-decorated API methods

**How to reproduce the issue (one of the many ways, see bottom for more):**

1. Create a new reddit account (or login to one that still see/needs CAPTCHA)
2. Click "Submit a new text post" (don't worry, we won't actually submit anything)
3. For title, enter "test"
4. For subreddit, enter a non-existent subreddit name (e.g. "asfasdfasdfasdfsadf")
5. Enter the correct solution for the CAPTCHA challenge
6. Click "submit"

**Expected result:** The submission fails with the subreddit field decorated with the "that subreddit doesn't exist" error message AND the CAPTCHA image refreshes.

**Actual result:** The submission fails with the subreddit field decorated with the "that subreddit doesn't exist" error message BUT the CAPTCHA image *doesn't* refresh.

**Summary of this change:** Update `validator.py` to issue new CAPTCHA identifier any time when calls to a `VCaptcha`-decorated API method fail.

**Additional notes:** The following API methods (along with their corresponding web forms) are affected by this bug:

- `POST_feedback` (bug reproducible at http://www.reddit.com/feedback/)
- `POST_compose` (bug reproducible at http://www.reddit.com/message/compose/)
- `POST_submit` (bug reproducible at http://www.reddit.com/submit)
- `POST_register` (bug masked by custom JavaScript UI Form error handler)
- `POST_share` (bug reproducible by clicking the share action link beneath each link)