Bug 682841 - IDN encoding failed with error code 5
Summary: IDN encoding failed with error code 5
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: jwhois
Version: 14
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Vitezslav Crhonek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-07 18:31 UTC by Michael Metz
Modified: 2011-06-07 04:23 UTC (History)
2 users (show)

Fixed In Version: jwhois-4.0-28.fc15
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-06-07 04:23:01 UTC


Attachments (Terms of Use)
proposed patch (1.04 KB, patch)
2011-03-15 13:18 UTC, Vitezslav Crhonek
no flags Details | Diff

Description Michael Metz 2011-03-07 18:31:44 UTC
Description of problem:
Trying to lookup a domain near the allowed maximum of 63 characters and
additionally giving options fails with RHEL5, RHEL6 & Fedora 14

Version-Release number of selected component (if applicable):
jwhois-3.2.3-8
jwhois-4.0-18
jwhois-4.0-23

Steps to Reproduce:
$ whois -h whois.denic.de
123456789012345678901234567890123456789012345678901234567890123.de
[Querying whois.denic.de]
[whois.denic.de]
% Copyright (c) 2010 by DENIC
% Version: 2.0
[...]
=> works as expected

whois -h whois.denic.de -- -T dn
123456789012345678901234567890123456789012345678901234567890123.de
[IDN encoding of '-T dn
123456789012345678901234567890123456789012345678901234567890123.de' failed with
error code 5]
=> fails

substracting 6 characters (for "-T dn "):
$ whois -h whois.denic.de -- -T dn
123456789012345678901234567890123456789012345678901234567.de
[Querying whois.denic.de]
[whois.denic.de]
% Error: 55000000007 Request not clearly specified
=> syntax error, okay - but query was sent to whois-server successfully.

Comment 1 Robert Scheck 2011-03-07 18:38:24 UTC
According to /etc/jwhois.conf, "-C UTF-8 -T dn,ace" is going to be passed to
the WHOIS server. I feel you should disable that part of your configuration,
before firing your whois request...

Comment 2 Michael Metz 2011-03-07 18:49:14 UTC
disabling query-format - line in jwhois.conf (didn't knew such a file existed *oops*) doesn't change anything.

Comment 3 Vitezslav Crhonek 2011-03-10 15:05:03 UTC
[IDN encoding of '-T dn
123456789012345678901234567890123456789012345678901234567890123.de' failed with
error code 5]

The fail is caused by libidn function idna_to_ascii_lz, error code 5 means "Output would be too large or too small". I think whois shouldn't pass RIPE options to that function, it's a bug.

Can be workarounded with giving RIPE options through jwhois.conf .

Comment 4 Vitezslav Crhonek 2011-03-15 13:18:09 UTC
Created attachment 484466 [details]
proposed patch

Sorry for confusion in previous comment, I meant of course general whois server options, not just RIPE extended options...

I attached proposed patch which should fix the issue and there'll be update available soon in the testing. Please let me know if it works as expected.

Comment 5 Fedora Update System 2011-03-15 13:32:17 UTC
jwhois-4.0-24.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/jwhois-4.0-24.fc14

Comment 6 Fedora Update System 2011-03-16 14:56:52 UTC
jwhois-4.0-26.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/jwhois-4.0-26.fc15

Comment 7 Fedora Update System 2011-03-16 19:52:18 UTC
jwhois-4.0-24.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2011-03-19 05:50:09 UTC
jwhois-4.0-26.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Vitezslav Crhonek 2011-04-26 12:44:25 UTC
Guys, I discussed the patch with Jonas Oberg and there's one question - the patch presumes, that queried address is last jwhois argument... What do you think - is it safe? Can we be sure that the last jwhois argument is always the queried address?

Comment 10 Robert Scheck 2011-05-22 11:26:32 UTC
I don't recall a case where the address isn't the last jwhois argument.
 And
sorry for that trouble, I didn't think about that issue when I wrote the IDN
support for jwhois something like 6 years ago.


By the way...your patch needs one tiny fix, because of a mistake:



-printf("[IDN encoding of '%s' failed with error code %d]\n", qstring, rc);

+printf("[IDN encoding of '%s' failed with error code %d]\n", argv[optind], rc);

Comment 11 Vitezslav Crhonek 2011-05-24 10:26:55 UTC
(In reply to comment #10)
> I don't recall a case where the address isn't the last jwhois argument.
>  And
> sorry for that trouble, I didn't think about that issue when I wrote the IDN
> support for jwhois something like 6 years ago.
> 
> 
> By the way...your patch needs one tiny fix, because of a mistake:
> 
> 
> 
> -printf("[IDN encoding of '%s' failed with error code %d]\n", qstring, rc);
> 
> +printf("[IDN encoding of '%s' failed with error code %d]\n", argv[optind],
> rc);

Thank you Robert for information and patch mistake notification - I'll fix it.

Comment 12 Fedora Update System 2011-05-24 11:38:18 UTC
jwhois-4.0-28.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/jwhois-4.0-28.fc15

Comment 13 Fedora Update System 2011-05-24 12:58:38 UTC
jwhois-4.0-25.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/jwhois-4.0-25.fc14

Comment 14 Fedora Update System 2011-05-25 03:07:56 UTC
Package jwhois-4.0-28.fc15:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing jwhois-4.0-28.fc15'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/jwhois-4.0-28.fc15
then log in and leave karma (feedback).

Comment 15 Fedora Update System 2011-06-02 18:56:12 UTC
jwhois-4.0-25.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 16 Fedora Update System 2011-06-07 04:22:44 UTC
jwhois-4.0-28.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.