Fossil

Check-in [a01c714c]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:It appears that calls to url_parse(0,x) are used to establish who the user is using user_select(). In this case we should not overwrite a password that has been provided prior to calling user_select() with one from the database.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | url-password-fixes
Files: files | file ages | folders
SHA1:a01c714c3ae01318e3eda1078b314ac527a5e224
User & Date: andybradford 2013-11-02 06:17:53
Context
2013-11-02
06:19
Only prompt to save the password if there is a tty. check-in: 34b2f067 user: andybradford tags: url-password-fixes
06:17
It appears that calls to url_parse(0,x) are used to establish who the user is using user_select(). In this case we should not overwrite a password that has been provided prior to calling user_select() with one from the database. check-in: a01c714c user: andybradford tags: url-password-fixes
2013-11-01
08:11
Avoid clobbering the last-sync-pw when doing sync --once. check-in: 8bdc3ccd user: andybradford tags: url-password-fixes
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/url.c.

74
75
76
77
78
79
80

81

82
83
84
85
86
87
88
  char *zFile = 0;
  int bPrompted = 0;
  int bSetUrl = 1;
 
  if( zUrl==0 ){
    zUrl = db_get("last-sync-url", 0);
    if( zUrl==0 ) return;

    g.urlPasswd = unobscure(db_get("last-sync-pw", 0));

    bSetUrl = 0;
  }

  if( strncmp(zUrl, "http://", 7)==0
   || strncmp(zUrl, "https://", 8)==0
   || strncmp(zUrl, "ssh://", 6)==0
  ){







>
|
>







74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
  char *zFile = 0;
  int bPrompted = 0;
  int bSetUrl = 1;
 
  if( zUrl==0 ){
    zUrl = db_get("last-sync-url", 0);
    if( zUrl==0 ) return;
    if( g.urlPasswd==0 ){
      g.urlPasswd = unobscure(db_get("last-sync-pw", 0));
    }
    bSetUrl = 0;
  }

  if( strncmp(zUrl, "http://", 7)==0
   || strncmp(zUrl, "https://", 8)==0
   || strncmp(zUrl, "ssh://", 6)==0
  ){