Text::Wrap 2012.0818 incorrectly parses strings when $Text::Wrap::huge = 'wrap'

RESOLVED DUPLICATE of bug 927455

Status

()

RESOLVED DUPLICATE of bug 927455
4 years ago
4 years ago

People

(Reporter: katelyn.baker, Unassigned)

Tracking

Details

(URL)

(Reporter)

Description

4 years ago
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.120 Safari/537.36

Steps to reproduce:

1. Create a bug
2. Edit that bug such that the URL field contains a URL where the host is specified in dot format (For example http://193.35.206.163/issues/client/index.php?issue=6239&order=issue_id&sort=desc)
3. Save changes
4. It will error






Actual results:

Get a page showing: -


URL: http://172.30.0.46/bugzilla-4.4.4/process_bug.cgi

undef error - This shouldn't happen at /usr/share/perl/5.18/Text/Wrap.pm line 84.
Traceback:


Expected results:

I would have expected the change to work.

If you "back" and delete the URL, you will get this error although reloading that bug will show the change has occurred. Additionally, and subsequent changes to any field for that bug will show this error on saving changes.

The only way to actually prevent it is to edit the entries for that bug in the bugs_activity table (simplest case I tried ws delete from bugs_activity where bug_id = <problematic bug>

Comment 1

4 years ago
Confirmed using 4.5.5. Interesting bug! :)
Assignee: general → create-and-change
Status: UNCONFIRMED → NEW
Component: Bugzilla-General → Creating/Changing Bugs
Ever confirmed: true

Comment 2

4 years ago
This is a bug in Text::Wrap 2012.0818 only. Text::Wrap 2013.0426 has been fixed, see https://rt.cpan.org/Public/Bug/Display.html?id=79766.

The fix is trivial. Edit Text/Wrap.pm and replace

  elsif ($huge eq 'wrap' && $t =~ /\G((?:(?!=[^\n])\X){$ll})/gc) {

by

  elsif ($huge eq 'wrap' && $t =~ /\G((?:(?=[^\n])\X){$ll})/gc) {


We could force Bugzilla to require Text::Wrap 2013.0426 or newer, or mark the bug as invalid and let you ask your Perl packager to release a newer Text::Wrap module. glob: your opinion?
Flags: needinfo?(glob)
Summary: The presence of a URL in a bug's history causes a PERL error every time that bug is updated → Text::Wrap 2012.0818 incorrectly parses strings when $Text::Wrap::huge = 'wrap'
(In reply to Frédéric Buclin from comment #2)
> This is a bug in Text::Wrap 2012.0818 only. Text::Wrap 2013.0426 has been
> fixed, see https://rt.cpan.org/Public/Bug/Display.html?id=79766.
>
> We could force Bugzilla to require Text::Wrap 2013.0426 or newer, or mark
> the bug as invalid and let you ask your Perl packager to release a newer
> Text::Wrap module. glob: your opinion?

tricky; Text::Wrap is a core module, and it looks like the version which ships with 5.18 is broken.

i don't think that requiring 2013.0426 or higher is the right thing to do, because it means sites with earlier versions of perl will need to upgrade the module (if possible) for no reason.

we could blacklist that version, but that seems heavy handed, and would mean sites running 5.18 will be unable to update bugzilla until their packager updates.

> or mark the bug as invalid and let you ask your Perl packager to release a newer Text::Wrap module

i think that's the best option here.
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Flags: needinfo?(glob)
Resolution: --- → INVALID

Comment 4

4 years ago
@rjbs: could you upgrade Text::Wrap to include the fix reported in this bug? I see you are close to releasing perl 5.18.3.

Comment 5

4 years ago
Although Text::Wrap is part of the core distribution, it is maintained outside of core by MUIR.  Please report the bug at https://rt.cpan.org/Public/Dist/Display.html?Name=Text-Tabs%2BWrap

(FWIW, updates like this are out of the scope of a patchlevel release like 5.18.3.  Fortunately, it will be upgradeable from CPAN.)

Comment 6

4 years ago
(In reply to Ricardo SIGNES from comment #5)
> Although Text::Wrap is part of the core distribution, it is maintained
> outside of core by MUIR.  Please report the bug at

As said in comment 2, this regression has already been fixed in Text::Wrap 2013.0426, released more than a year ago.

Comment 7

4 years ago
Okay.  If the only question is, "Can 5.18.3 be made to include this version," then no.  The criteria for updates in maintenance branches are quite strict.

http://perldoc.perl.org/perlpolicy.html#MAINTENANCE-BRANCHES

Updated

4 years ago
Resolution: INVALID → DUPLICATE
Duplicate of bug: 927455
You need to log in before you can comment on or make changes to this bug.