Server IP : 104.21.38.3 / Your IP : 172.70.142.54 Web Server : Apache System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/lib/ruby/3.0.0/bundler/ |
Upload File : |
# frozen_string_literal: true module Bundler module URICredentialsFilter module_function def credential_filtered_uri(uri_to_anonymize) return uri_to_anonymize if uri_to_anonymize.nil? uri = uri_to_anonymize.dup if uri.is_a?(String) return uri if File.exist?(uri) require_relative "vendored_uri" uri = Bundler::URI(uri) end if uri.userinfo # oauth authentication if uri.password == "x-oauth-basic" || uri.password == "x" # URI as string does not display with password if no user is set oauth_designation = uri.password uri.user = oauth_designation end uri.password = nil end return uri.to_s if uri_to_anonymize.is_a?(String) uri rescue Bundler::URI::InvalidURIError # uri is not canonical uri scheme uri end def credential_filtered_string(str_to_filter, uri) return str_to_filter if uri.nil? || str_to_filter.nil? str_with_no_credentials = str_to_filter.dup anonymous_uri_str = credential_filtered_uri(uri).to_s uri_str = uri.to_s if anonymous_uri_str != uri_str str_with_no_credentials = str_with_no_credentials.gsub(uri_str, anonymous_uri_str) end str_with_no_credentials end end end