Spend some time type-checking - no exploitable vulns we are aware of, but no reason to leave it to future chance
parent
272591b3d3
commit
6685a65c39
|
@ -12,6 +12,10 @@ end
|
|||
|
||||
def rpc_login_noauth(user,pass)
|
||||
|
||||
if not (user.kind_of?(::String) and pass.kind_of?(::String))
|
||||
error(401, "Login Failed")
|
||||
end
|
||||
|
||||
# handle authentication here
|
||||
fail = true
|
||||
self.users.each do |u|
|
||||
|
|
|
@ -198,6 +198,11 @@ class Service
|
|||
def authenticate(token)
|
||||
stale = []
|
||||
|
||||
|
||||
if not (token and token.kind_of?(::String))
|
||||
return false
|
||||
end
|
||||
|
||||
# Force the encoding to ASCII-8BIT
|
||||
token = token.unpack("C*").pack("C*")
|
||||
|
||||
|
|
|
@ -199,7 +199,7 @@ module Parser
|
|||
return unless @report_type_ok
|
||||
unless @state[:current_tag].empty?
|
||||
missing_ends = @state[:current_tag].keys.map {|x| "'#{x}'"}.join(", ")
|
||||
msg = "Warning, the provided file is incomplete, and there may be missing\n"
|
||||
l msg = "Warning, the provided file is incomplete, and there may be missing\n"
|
||||
msg << "data. The following tags were not closed: #{missing_ends}."
|
||||
db.emit(:warning,msg,&block) if block
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue