403Webshell
Server IP : 66.29.132.122  /  Your IP : 3.144.115.154
Web Server : LiteSpeed
System : Linux business142.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : admazpex ( 531)
PHP Version : 7.2.34
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /proc/self/root/opt/alt/ruby26/lib64/ruby/2.6.0/bundler/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/self/root/opt/alt/ruby26/lib64/ruby/2.6.0/bundler/uri_credentials_filter.rb
# 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
      uri = URI(uri.to_s) unless uri.is_a?(URI)
      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 if uri_to_anonymize.is_a?(URI)
      return uri.to_s if uri_to_anonymize.is_a?(String)
    rescue 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

Youez - 2016 - github.com/yon3zu
LinuXploit