<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>149369</bug_id>
          
          <creation_ts>2007-08-30 06:36:30 +0000</creation_ts>
          <short_desc>KDE widget that accepts password behaves wrong when keyboard layout is not US</short_desc>
          <delta_ts>2009-04-27 22:21:19 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>10</classification_id>
          <classification>Unmaintained</classification>
          <product>kdelibs</product>
          <component>general</component>
          <version>unspecified</version>
          <rep_platform>Debian testing</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ana Guerrero">ana</reporter>
          <assigned_to name="Stephan Kulow">coolo</assigned_to>
          <cc>kde-2011.08</cc>
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>543402</commentid>
    <comment_count>0</comment_count>
    <who name="Ana Guerrero">ana</who>
    <bug_when>2007-08-30 06:36:30 +0000</bug_when>
    <thetext>Version:            (using KDE KDE 3.5.7)
Installed from:    Debian testing/unstable Packages
OS:                Linux

[Bug from the Debian BTS: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=413055]

Max Dmitrichenko:
I have configured my keyboard for two layouts &quot;us&quot; and &quot;ru&quot;. If I switch keyboard to &quot;ru&quot; layout and KDE dialog prompting password appears then for every character I type into password field two asteriks appear. To reproduce it, you can run Control Center and in any administration applet click appropriate button to switch into admin mode and when dialog prompting root password appears switch the layout to different language and try to type something. Another way to reproduce it is KDE lock screen: try to enter password there with switched layout.

Plain Qt programs do not suffer from this bug. Checked on Psi.


-----

&gt; One thing I don&apos;t fully understand in your bug report. Is it just a &apos;cosmetic&apos; 
&gt; issue - or does logging in not work?
&gt; What if you use backspace? do one or two stars dissapear ?

No, it isn&apos;t just a &apos;cosmetic&apos; issue. Backspace deletes only one star. I didn&apos;t
check weather a correct password is entered or not, because I don&apos;t have passwords which contain non-latin chars.

I suspect that problem is with UTF-8, i.e. entering a two-byte UTF-8 character displays two &quot;*&quot;.

-----

Ok. I have found the bug and written the patch. The bug is in KPasswordEdit 
widget. The author has chosen to store password in a raw char[] array (maybe, 
for security reasons). When the password field was updated, it printed as
many * as the length of this array. Backspace deleted only one char, that
is a half of UTF-8 cyrillic char, so this is definitely a bug.

I&apos;ve tested it with latin and cyrillic passwords, both works!.

-----

Attached patch from Max Dmitrichenko for your consideration.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>543403</commentid>
    <comment_count>1</comment_count>
      <attachid>21510</attachid>
    <who name="Ana Guerrero">ana</who>
    <bug_when>2007-08-30 06:38:07 +0000</bug_when>
    <thetext>Created attachment 21510
Patch by Max Dmitrichenko &lt;dmitrmax@rain.ifmo.ru&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>653554</commentid>
    <comment_count>2</comment_count>
    <who name="Dotan Cohen">kde-2011.08</who>
    <bug_when>2008-10-14 12:29:41 +0000</bug_when>
    <thetext>I can confirm this bug in KDE 3.x when typing in Hebrew. I will check KDE 4.x as soon as I get the chance.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>748668</commentid>
    <comment_count>3</comment_count>
    <who name="Dotan Cohen">kde-2011.08</who>
    <bug_when>2009-04-27 22:21:19 +0000</bug_when>
    <thetext>This issue seems to be resolved in KDE 4.2.2. If you still have this issue, then please reopen. Thanks.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>21510</attachid>
            <date>2007-08-30 06:38:07 +0000</date>
            <delta_ts>2007-08-30 06:38:07 +0000</delta_ts>
            <desc>Patch by Max Dmitrichenko &lt;dmitrmax@rain.ifmo.ru&gt;</desc>
            <filename>kpasswordedit.patch</filename>
            <type>text/plain</type>
            <size>1774</size>
            <attacher name="Ana Guerrero">ana</attacher>
            
              <data encoding="base64">ZGlmZiAtTnJ1YSBzb3VyY2VzL2tkZWxpYnMtMy41LjVhLmRmc2cuMS9rZGV1aS9rcGFzc2RsZy5j
cHAga2RlbGlicy0zLjUuNWEuZGZzZy4xL2tkZXVpL2twYXNzZGxnLmNwcAotLS0gc291cmNlcy9r
ZGVsaWJzLTMuNS41YS5kZnNnLjEva2RldWkva3Bhc3NkbGcuY3BwCTIwMDYtMDEtMTkgMjA6MDc6
MTguMDAwMDAwMDAwICswMzAwCisrKyBrZGVsaWJzLTMuNS41YS5kZnNnLjEva2RldWkva3Bhc3Nk
bGcuY3BwCTIwMDctMDgtMDIgMDU6NDM6MDkuMDAwMDAwMDAwICswNDAwCkBAIC0yMDUsNyArMjA1
LDEyIEBACiAJaWYgKGUtPnN0YXRlKCkgJiAoQ29udHJvbEJ1dHRvbiB8IEFsdEJ1dHRvbikpCiAJ
ICAgIGUtPmlnbm9yZSgpOwogCWVsc2UgaWYgKG1fTGVuZ3RoKSB7Ci0JICAgIG1fUGFzc3dvcmRb
LS1tX0xlbmd0aF0gPSAnXDAwMCc7CisgICAgICAgICAgICBRU3RyaW5nIHRtcChRU3RyaW5nOjpm
cm9tTG9jYWw4Qml0KG1fUGFzc3dvcmQpKTsKKyAgICAgICAgICAgIHRtcC50cnVuY2F0ZSh0bXAu
bGVuZ3RoKCkgLSAxKTsKKworICAgICAgICAgICAgY29uc3QgUUNTdHJpbmcgbG9jYWxUeHQgPSB0
bXAubG9jYWw4Qml0KCk7CisgICAgICAg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DAwMCc7CiAgICAgICAgIC0tbV9MZW5ndGg7CkBAIC02MjUsNyArNjMw
LDcgQEAKIAogICAgICAgY29uc3QgZG91YmxlIGxlbmd0aEZhY3RvciA9IGQtPnJlYXNvbmFibGVQ
YXNzd29yZExlbmd0aCAvIDguMDsKIAotICAgICAgCisKICAgICAgIGludCBwd2xlbmd0aCA9IChp
bnQpIChwYXNzLmxlbmd0aCgpIC8gbGVuZ3RoRmFjdG9yKTsKICAgICAgIGlmIChwd2xlbmd0aCA+
IDUpIHB3bGVuZ3RoID0gNTsKIApAQCAtNjQ2LDcgKzY1MSw3IEBACiAgICAgICBpZiAoIHB3c3Ry
ZW5ndGggPCAwICkgewogCSAgICAgIHB3c3RyZW5ndGggPSAwOwogICAgICAgfQotICAKKwogICAg
ICAgaWYgKCBwd3N0cmVuZ3RoID4gMTAwICkgewogCSAgICAgIHB3c3RyZW5ndGggPSAxMDA7CiAg
ICAgICB9Cg==
</data>

          </attachment>
      

    </bug>

</bugzilla>