Bug 72778 - FTP-upload is not possible if the username contain a '@'
Summary: FTP-upload is not possible if the username contain a '@'
Status: RESOLVED WORKSFORME
Alias: None
Product: quanta
Classification: Unmaintained
Component: general (other bugs)
Version First Reported In: 3.1.4
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: András Manţia
URL:
Keywords:
: 108569 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-01-16 21:50 UTC by Rene Fertig
Modified: 2005-07-05 11:04 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rene Fertig 2004-01-16 21:50:11 UTC
Version:           3.1.4 (using KDE KDE 3.1.4)
Installed from:    SuSE RPMs
OS:          Linux

At one of my sites I need to use the username "rfertig@wat-theater.de". Quanta combine this username with the hostname "wat-theater.de" to the URL "ftp://rfertig@wat-theater.de@wat-theater.de" and fails to connect to the hosts.
I updated recently from an older version of quanta (might be 3.0. or 3.1.2), where this was no problem.
Comment 1 Thiago Macieira 2004-01-17 04:01:02 UTC
If you replace the @ in the username with %40, does it work?
Comment 2 Rene Fertig 2004-01-17 15:12:50 UTC
Hi Thiago!
No, unfortunately it didn't. Quanta convert this to "ftp://rfertig%2540wat-theater.de@wat-theater.de". I tried to escape the '%' (and the at, too) with a backslash, it didn't work either.
I'd also tried to put the username within single and double quotes, but this didn't help, too.
Regards, Rene
Comment 3 András Manţia 2004-01-17 15:57:39 UTC
Subject: Re:  FTP-upload is not possible if the username contain a '@'

And does it work if you try to connect to that FTP site with Konqueror?

Andras

Comment 4 Rene Fertig 2004-01-17 17:46:20 UTC
I knew that this question will come :-) Unfortunately I tried this but made a typo (I forgot the ':' after ftp) and now konqueror change every "ftp://rfertig@wat-theater.de@wat-theater.de" to "ftp://ftp//rfertig@wat-theater.de@wat-theater.de" what is definitely wrong. Of cause I tried to clear the cache but I appears again and again :-(
Any idea to cope with this?
Did it work when you tried it?
Comment 5 András Manţia 2004-01-17 18:02:04 UTC
Subject: Re:  FTP-upload is not possible if the username contain a '@'

How does it change? If you enter that, Konqueror should accept. Just don't 
select what is offered in the  dropwdown list. Or clear the history/disable 
the autocompletion: right click on the location bar, Clear History or right 
click->Text Completion->None.

Comment 6 Rene Fertig 2004-01-17 19:01:24 UTC
I don't know, how it changes. Even if I clear the history and disable auto-completion: it changes! Even if I enter the right URL as a bookmark with the bookmark-editor - when I choose the bookmark, it changes! It feels like a MSIE :-((
I can enter ftp://"rfertig@wat-theater.de"@wat-theater.de - konqueror change it to ftp://ftp//"rfertig@wat-theater.de"@wat-theater.de
Comment 7 Rene Fertig 2004-01-17 19:43:36 UTC
Ah, I've fooled konqueror now! I entered ftp://rfertig%40wat-theater.de@wat-theater.de in konqueror and it was changed to ftp://rfertig@wat-theater.de@wat-theater.de and - it works! Konqueror now prompt for a password and with the right one the connection astablished. So good with konqueror but my main problem was quanta and as mentioned above, quanta change the %40 to %2540, so this trick didn't work for quanta :-(
Comment 8 András Manţia 2004-01-17 22:13:57 UTC
Subject: Re:  FTP-upload is not possible if the username contain a '@'

> ------- Additional Comments From rene@renux.de  2004-01-17 19:01 -------
> I don't know, how it changes. Even if I clear the history and disable
> auto-completion: it changes! Even if I enter the right URL as a bookmark
> with the bookmark-editor - when I choose the bookmark, it changes! It feels
> like a MSIE :-(( I can enter ftp://"rfertig@wat-theater.de"@wat-theater.de
> - konqueror change it to ftp://ftp//"rfertig@wat-theater.de"@wat-theater.de

Hm right. Any idea? For me it changes from 
ftp://rfertig@wat-theater.de@wat-theater.de

TO

ftp://ftp//rfertig%40wat-theater.de%40wat-theater.de

Andras


Comment 9 Rene Fertig 2004-01-18 19:34:49 UTC
I don't understand what you want to tell me with your last comment, Andras. Sorry.
As I said yesterday (Comment #7), Konqueror now works for me. But the original problem ist still with quanta.
Comment 10 András Manţia 2004-01-18 19:43:40 UTC
The comment was CC-d to the Konqueror developer list. ;-)
Comment 11 Yves Glodt 2004-03-09 08:21:03 UTC
Problem still exists in quanta from KDE 3.2.1
Comment 12 András Manţia 2004-05-07 21:02:22 UTC
I tried not so long ago and here is a copy of my mail to the Quanta user 
list (the thread was called "wrong password"):

I have trouble to create a user which contains @ on my system, but I did
some workaround, like adding a new entry manually to /etc/passwd
and /etc/shadow, so I can test the login. What I saw is that I cannot
login from Konqueror (CVS HEAD) with ftp://test@localhost@localhost (I
get "An error occurred while loading
ftp://ftp//test%40localhost%40localhost:"), but I can log in using
ftp://test%40localhost@localhost.

Now the strange part: with Quanta using test@localhost for user and
localhost for server uploading works. Using test%40localhost for user
does not work.

Do you see something else? As I see this is something which isn't
handled correctly in KDE libs or there is no real standard how to
handle it. Quanta simply sets the user field of a KURL to the text
you've typed, so it's up to KDE to treat this. And the documentation
says:
"Special characters in the user name will appear encoded in the URL."

So this is good, both according to the behavior and to the usage of the
KURL.

Comment 13 András Manţia 2004-06-11 17:25:39 UTC
Closing as I cannot reproduce. I have tried with several servers.

Comment 14 Jerome C 2004-09-30 04:02:33 UTC
This bug should be reopened:

When creating an upload profile, if you enter the '@' character in the username field, such as 'username@server.com', the new profile doesn't appear in the upload side-bar. If you then try to upload a file using that profile, Quanta hangs after clicking 'Proceed'.

If I replace '@' by '%40', the following happens:
In the upload profiles side-bar, I can get an initial listing of the directories, but am unable to browse further. Quanta reports 'Could not enter foldername'. If I try to upload a file, I get a login error. It does not replace '%40' by '@' in the username field.
Comment 15 András Manţia 2005-07-05 10:52:36 UTC
*** Bug 108569 has been marked as a duplicate of this bug. ***
Comment 16 András Manţia 2005-07-05 11:04:52 UTC
SVN commit 431789 by amantia:

Show an upload treeview for profiles that have @ (at sign) in the username.

CCBUG: 72778


 M  +1 -0      ChangeLog  
 M  +4 -4      project/uploadprofiles.cpp  
 M  +2 -2      quanta.kdevelop  


--- trunk/KDE/kdewebdev/quanta/ChangeLog #431788:431789
@@ -12,6 +12,7 @@
         - show the correct relative paths in URL autocompletion
         - fix crash when unsetting breakpoints
         - entity autocompletion fixes
+        - show an upload treeview for profiles that have @ in the username
 
  - improvements:
         - nicer processing of CVS output
--- trunk/KDE/kdewebdev/quanta/project/uploadprofiles.cpp #431788:431789
@@ -98,10 +98,6 @@
 {
   QString protocol = e.attribute("remote_protocol","ftp") + "://";
   QString s = protocol;
-  QString user = e.attribute("user","");
-  if (! user.isEmpty()) {
-    s += user + "@";
-  }
   QString host = e.attribute("remote_host","");
   s += host;
   QString port = e.attribute("remote_port","");
@@ -110,6 +106,10 @@
   }
   s += e.attribute("remote_path","");
   KURL url = KURL::fromPathOrURL(s);
+  QString user = e.attribute("user","");
+  if (!user.isEmpty()) {
+    url.setUser(user);
+  }
   // check if we know the password
   if ( !user.isEmpty() && Project::ref()->keepPasswd )
   {
--- trunk/KDE/kdewebdev/quanta/quanta.kdevelop #431788:431789
@@ -241,10 +241,10 @@
   </kdevcvs>
   <kdevfilecreate>
     <filetypes>
-      <type icon="" ext="h" create="template" name="C++ header" >
+      <type icon="" ext="h" name="C++ header" create="template" >
         <descr>Quanta speicfic header</descr>
       </type>
-      <type icon="source_cpp" ext="cpp" create="template" name="C++ source" >
+      <type icon="source_cpp" ext="cpp" name="C++ source" create="template" >
         <descr>A new empty C++ file.</descr>
       </type>
     </filetypes>