Page MenuHomePhabricator

When an ISBN has an X where it should have a 0, Special:BookSources treats it as valid
Closed, ResolvedPublic


I noticed this when checking old TODOs and reading the code. It is a bug arising in part from the use of PHP's loose equality (==) operator.

Steps to reproduce:

  1. Open
  2. Open
  3. Open

Actual results: #1 gives, "The given ISBN does not appear to be valid; check for errors copying from the original source." #2 and #3 give no error.

Expected results: both #1 and #2 should give that error message. Only #3 should give no error.

Version: 1.24rc
Severity: minor



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:35 AM
bzimport set Reference to bz67021.

Change 141654 had a related patch set uploaded by PleaseStand:
Special:BookSources: Correct ISBN-10 validation for numbers ending in X

Change 141654 merged by jenkins-bot:
Special:BookSources: Correct validation of ISBNs containing X