typo in xdg-email script preventing processing destination email address

Bug #778464 reported by VadimL
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
xdg-utils (Ubuntu)
Fix Released
Medium
Unassigned
Lucid
Fix Released
Medium
Bartosz Kosiorek

Bug Description

Binary package hint: xdg-utils

Line 392 in xdg-email script contains:
TOqul=$(echo "$MAILTO" | grep '^to=' | sed 's/^to=//' | awk '{ printf "%s,",$0 }')

It should be:

TO=$(echo "$MAILTO" | grep '^to=' | sed 's/^to=//' | awk '{ printf "%s,",$0 }')

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: xdg-utils 1.0.2-6.1ubuntu3.1 [modified: usr/bin/xdg-email]
ProcVersionSignature: Ubuntu 2.6.32-31.61-generic 2.6.32.32+drm33.14
Uname: Linux 2.6.32-31-generic x86_64
NonfreeKernelModules: fglrx
Architecture: amd64
Date: Fri May 6 14:07:31 2011
Dependencies:

InstallationMedia: Kubuntu 10.04 LTS "Lucid Lynx" - Release amd64 (20100427)
PackageArchitecture: all
ProcEnviron:
 LANG=en_IE.utf8
 SHELL=/bin/bash
SourcePackage: xdg-utils

Related branches

tags: added: bitesize
Revision history for this message
Jeff Nappi (jeffnappi) wrote :

This old bug is still present in the current Lucid packages!

Revision history for this message
Fredrik-lysholm (fredrik-lysholm) wrote :

So for us still clinging to 10.04 you can edit /usr/bin/xdg-email by your selfs...

May I also suggest allowing correct processing of links where for example body and subject is not always in lowercase ? This can be done by adding the -i flag to grep and do a s/^subject=/subject=/i via sed.

Furthermore, since I often stumble upon emails written with @ replaced with (at) and . with (dot), which actually displays correctly using chromium, I added support for this via this line:

    TO=$(echo "$TO" | sed 's/\s*(dot)\s*/./g' | sed 's/\s*(at)\s*/@/');

My changes to allow for non-lower case "body=" etc. in mailto URLs:

    MAILTO=$(echo "$MAILTO" | sed 's/&/\n/g')
    TO=$(echo "$MAILTO" | grep '^to=' -i | sed 's/^to=//' | awk '{ printf "%s,",$0 }')
    CC=$(echo "$MAILTO" | grep '^cc=' -i | sed 's/^cc=//' | awk '{ printf "%s,",$0 }')
    BCC=$(echo "$MAILTO" | grep '^bcc=' -i | sed 's/^bcc=//' | awk '{ printf "%s,",$0 }')
    SUBJECT=$(echo "$MAILTO" | grep '^subject=' -i | tail -n 1 | sed 's/^subject=/subject=/i')
    BODY=$(echo "$MAILTO" | grep '^body=' -i | tail -n 1 | sed 's/^body=/body=/i')
    ATTACH=$(echo "$MAILTO" | sed 's/^attach=/\n\nfile:\/\//gi' | awk '/^file:/ { printf "%s,",$0 }')
    ATTACH=$(echo "$ATTACH" | sed 's/,$//')

Note the -i flag passed to grep and the sed to replace non-lowercase keys which is also need.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in xdg-utils (Ubuntu):
status: New → Confirmed
Angel Abad (angelabad)
Changed in xdg-utils (Ubuntu):
importance: Undecided → Medium
Revision history for this message
lijia (lijia1) wrote :

This is my first time investigating a bug in Ubuntu.
I branched both the latest as well as the lucid branch of xdg-utils. I don't see the described bug. Furthermore the line 392 in both branch don't match Bug Report.
I am using Xubuntu/xfce 11.10

Revision history for this message
sabby (sabby) wrote :

I can confirm the change for @Fredrik works for me also, thank you. This has bothered me for a while but not enough to look into it until today when I found this bug report. Also using 10.04. This is a simple fixed and should be pushed into at least lucid proposed. My version of xdg-utils is 1.0.2-6.1ubuntu3.1. I don't believe I have an account to fix this since this has been fixed in the latest xdg-utils it just hasn't been backported to lucid, might be better to backport the laster version intead...

Revision history for this message
Martin Pitt (pitti) wrote :

Fixed in precise. Adding lucid task for SRU.

Changed in xdg-utils (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

Sponsored, uploaded to lucid-proposed review queue. Thanks!

Changed in xdg-utils (Ubuntu Lucid):
status: New → In Progress
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Hello VadimL, or anyone else affected,

Accepted xdg-utils into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in xdg-utils (Ubuntu Lucid):
status: In Progress → Fix Committed
tags: added: verification-needed
Changed in xdg-utils (Ubuntu Lucid):
importance: Undecided → Medium
Revision history for this message
Bartosz Kosiorek (gang65) wrote :

After install xdg-utils package on Lucid the problem was gone.

Verification was successfull.

Changed in xdg-utils (Ubuntu Lucid):
assignee: nobody → Bartosz Kosiorek (gang65)
tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xdg-utils - 1.0.2-6.1ubuntu3.2

---------------
xdg-utils (1.0.2-6.1ubuntu3.2) lucid-proposed; urgency=low

  [ Kenneth Solbø Andersen ]
  * debian/patches/xdg-email-thunderbird.patch: Change "TOqul=" to "TO="
    (LP: #778464)
 -- Martin Pitt <email address hidden> Mon, 23 Jan 2012 15:43:56 +0100

Changed in xdg-utils (Ubuntu Lucid):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.