Bad calls to get_string upload csv for duplicate remote usernames

Bug #968697 reported by Richard Mansfield
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Low
Richard Mansfield

Bug Description

When uploading users from a csv file, the remote usernames given in the file are checked for duplicates. When a duplicate is found, get_string is called to generate the error message using the string key 'uploadcsverrorremoteusertaken', but in two of three instances, it is called with too few arguments to sprintf. Sometimes this results in no error being reported to the user at all.

Tags: csvupload
tags: added: csvupload
Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/1106
Committed: http://gitorious.org/mahara/mahara/commit/96cd77d432c908c9be0ec8b571f338b08f3a70c7
Submitter: Francois Marier (<email address hidden>)
Branch: 1.5_STABLE

commit 96cd77d432c908c9be0ec8b571f338b08f3a70c7
Author: Richard Mansfield <email address hidden>
Date: Wed Mar 21 14:26:25 2012 +1300

    Fix get_string calls for duplicate remote username message (bug #968697)

    When uploading users from a csv file, the remote usernames given in
    the file are checked for duplicates. When a duplicate is found,
    get_string is called to generate the error message using the string
    key 'uploadcsverrorremoteusertaken', but in two of three instances, it
    is called with too few arguments to sprintf. Sometimes this results
    in no error being reported to the user at all.

    The error is fixed here by creating a new string without the second
    argument for the first call, and by passing the additional argument in
    the second call.

    Change-Id: Iff93385dee206394c74b1d6b1ad9484e90026dd4
    Signed-off-by: Richard Mansfield <email address hidden>

Changed in mahara:
status: In Progress → Fix Committed
Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/1104
Committed: http://gitorious.org/mahara/mahara/commit/938fa7db02de52d8722ea165be9153e8b09f8b4f
Submitter: Francois Marier (<email address hidden>)
Branch: master

commit 938fa7db02de52d8722ea165be9153e8b09f8b4f
Author: Richard Mansfield <email address hidden>
Date: Wed Mar 21 14:26:25 2012 +1300

    Fix get_string calls for duplicate remote username message (bug #968697)

    When uploading users from a csv file, the remote usernames given in
    the file are checked for duplicates. When a duplicate is found,
    get_string is called to generate the error message using the string
    key 'uploadcsverrorremoteusertaken', but in two of three instances, it
    is called with too few arguments to sprintf. Sometimes this results
    in no error being reported to the user at all.

    The error is fixed here by creating a new string without the second
    argument for the first call, and by passing the additional argument in
    the second call.

    Change-Id: Iff93385dee206394c74b1d6b1ad9484e90026dd4
    Signed-off-by: Richard Mansfield <email address hidden>

Revision history for this message
Melissa Draper (melissa) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

status: fixreleased
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJPjqbSAAoJECXBtiziiXdc9lQH/ihyu7QAsQTauz6R0kgBF2og
xGfwoCzflrqvhr0M52SR9mS/oVvb0ZerWl6CL2aJ8Aq5dTGNZ2+dHsDZTTYGQzF0
qLheaMcgjVQyCasJQzFwP4eVhxP5d7PUvHTPoB2SfQOMrzb6LdbF3ZuaPk11bImk
zjRhyzLIDuqPGCvkm/RSr3RlyuLlQD6/mSXfHLXRMKuG6ZXZQdgwvAgbRVrqCukJ
HeAfb9i1gVLgMoKO1OGur+sCYD155g6GtykNolwC1vXGI2lwL5yko4rBq47m1zTJ
iEMJngvutbkLqfkLye2DrqEGfPdJSD28cn0yTrGo4r8c8v+VErQG2fw28Do62AQ=
=PEOy
-----END PGP SIGNATURE-----

Revision history for this message
Melissa Draper (melissa) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

status fixreleased
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJPjrKtAAoJECXBtiziiXdcUwoH/2T7TneDztExyzwY3jqJTs/Y
RyZ+uApeCE5D2ICXyJjXwQa5J4hwSnVwXWB6W0BGUspaTlHk5DU2uHMV7tJ6GnyK
+Z/jxi99+oRi3ejXk21hpZou9c1uPTtHHzNw8l/y8S3yOBwo+kWE9UNjrpYHNGZc
BRtQyh447e+4x4ocrR5ldieyEo5gYiFztVAtxNKSx00iCTpGXEiGmLKQ+8RhABMc
b/yOYWmLrgcBrvbC8xuQWZoXYgiZvsC0pjZnMHVW1SDrXHLbxsdcE1D/T1Vm+U7q
f0tHry8pHQnJQlbd8hm6vlOQR8Zo3wEB8knRCR0euQFr9oC32PBHaVLHZ75Dx+4=
=NY/1
-----END PGP SIGNATURE-----

Revision history for this message
Melissa Draper (melissa) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

 status fixreleased
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJPjrT9AAoJECXBtiziiXdcoRgIAI6WEF/A3ND2GQDSpnq5f/tC
dX+/FeJZVxYHJpRv9z3v9pQ47AuNacrcWJkRdDsc7A+/XEP++DWUU5lvYy65941s
gekqH765BpnPqOU3QAWzhhQqQAJo/aSk94H+YZCoJTtw4tA4sOWxITkItb1SAt33
Q8bnKihJZYHtgfKtEv7gzd2oyk5Jk1xAJjE8fpcJpjXdkpF2Gda82JOpR2hrFnfo
k/nH5VLwHELKBMmLhFjTasfe2R5/LjBaDQp4r93ZdZBl5qer00yUQoEIgInJg+LK
Rs5onHkg5YWn5ezTrMkRBAp/goHyrcYaunC4sJ4cazP1+YtC10oJq8fnuv1Xq9A=
=fz6e
-----END PGP SIGNATURE-----

Changed in mahara:
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.