Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 7379

Show
Ignore:
Timestamp:
08/30/07 15:02:53 (1 year ago)
Author:
minam
Message:

Avoid using the --password switch with subversion for security purposes (closes #9304)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • tools/capistrano/CHANGELOG

    r7378 r7379  
    11*SVN* 
     2 
     3* Avoid using the --password switch with subversion for security purposes [sentinel] 
    24 
    35* Add version_dir, current_dir, and shared_dir variables for naming the directories used in deployment [drinkingbird] 
  • tools/capistrano/lib/capistrano/recipes/deploy/scm/subversion.rb

    r6702 r7379  
    8282        private 
    8383 
    84           # If a username or password is configured for the SCM, return the 
    85           # command-line switches for those values. 
     84          # If a username is configured for the SCM, return the =command-line 
     85          # switches for that. Note that we don't need to return the password 
     86          # switch, since Capistrano will check for that prompt in the output 
     87          # and will respond appropriately. 
    8688          def authentication 
    87             auth = "" 
    88             auth << "--username #{variable(:scm_username)} " if variable(:scm_username) 
    89             auth << "--password #{variable(:scm_password)} " if variable(:scm_password) 
    90             auth << "--no-auth-cache" if !auth.empty? 
    91             auth 
     89            username = variable(:scm_username) 
     90            return "" unless username 
     91            "--username #{variable(:scm_username)} --no-auth-cache " 
    9292          end 
    9393