class Addressable::URI
def normalized_password
-
(String)
- The password component, normalized.
def normalized_password return nil unless self.password return @normalized_password unless @normalized_password == NONE @normalized_password = begin if self.normalized_scheme =~ /https?/ && self.password.strip.empty? && (!self.user || self.user.strip.empty?) nil else Addressable::URI.normalize_component( self.password.strip, Addressable::URI::NormalizeCharacterClasses::UNRESERVED ) end end # All normalized values should be UTF-8 force_utf8_encoding_if_needed(@normalized_password) @normalized_password end