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)
|
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
|
# handle authentication here
|
||||||
fail = true
|
fail = true
|
||||||
self.users.each do |u|
|
self.users.each do |u|
|
||||||
|
|
|
@ -198,6 +198,11 @@ class Service
|
||||||
def authenticate(token)
|
def authenticate(token)
|
||||||
stale = []
|
stale = []
|
||||||
|
|
||||||
|
|
||||||
|
if not (token and token.kind_of?(::String))
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
# Force the encoding to ASCII-8BIT
|
# Force the encoding to ASCII-8BIT
|
||||||
token = token.unpack("C*").pack("C*")
|
token = token.unpack("C*").pack("C*")
|
||||||
|
|
||||||
|
|
|
@ -199,7 +199,7 @@ module Parser
|
||||||
return unless @report_type_ok
|
return unless @report_type_ok
|
||||||
unless @state[:current_tag].empty?
|
unless @state[:current_tag].empty?
|
||||||
missing_ends = @state[:current_tag].keys.map {|x| "'#{x}'"}.join(", ")
|
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}."
|
msg << "data. The following tags were not closed: #{missing_ends}."
|
||||||
db.emit(:warning,msg,&block) if block
|
db.emit(:warning,msg,&block) if block
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue