<table><tr><td style="">martinkostolny created this revision.<br />Restricted Application added a project: Plasma.<br />Restricted Application added a subscriber: plasma-devel.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D4775" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>This is meant more as a question rather then actual code fix intention:</p>

<p>I have a problem with <tt style="background: #ebebeb; font-size: 13px;">sudoedit</tt> cmd line tool only accepting password from <tt style="background: #ebebeb; font-size: 13px;">ksshaskpass</tt> if it is provided with newline in the end. Specifically in current state - calling:</p>

<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">EDITOR=kate SUDO_ASKPASS=/usr/bin/ksshaskpass sudoedit -A /etc/hosts</pre></div>

<p>...will result in a Ksshaskpass dialog and after entering the password the command just ends. But after applying this patch it starts working and kate is opened.</p>

<p>I tried other graphical askpass programs, namely ssh-askpass, qt4-ssh-askpass, lxqt-ssh-askpass and gnome-ssh-askpass2 (gtk2). They all work nicely with sudoedit.</p>

<p>My question is: Is it intentional that the password is not returned with newline? Should I ask sudoedit guys instead? Or is the problem elswhere, e.g. in KPasswordDialog (KF5 kwidgetaddons)? Thanks!</p>

<p>PS: Please add reviewers as needed, I don't know the proper flow here, sorry :).</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>Tested on sudoedit as well as git connecting to github with username and password.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R105 KDE SSH Password Dialog</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D4775" rel="noreferrer">https://phabricator.kde.org/D4775</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/main.cpp</div></div></div><br /><div><strong>EMAIL PREFERENCES</strong><div><a href="https://phabricator.kde.org/settings/panel/emailpreferences/" rel="noreferrer">https://phabricator.kde.org/settings/panel/emailpreferences/</a></div></div><br /><div><strong>To: </strong>martinkostolny, cfeck<br /><strong>Cc: </strong>plasma-devel, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol<br /></div>