General

Profile

crojas (Carlos Luis Rojas Aragonés)

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 0 1 1

Activity

09/06/2014

09:10 PM Ruby Bug #10209: attr_reader vulnerability
mmm I think IMHO that the attr_reader accessor should return a .dub version of the object. That way there will be no chance to edit the class attribute on a read action. crojas (Carlos Luis Rojas Aragonés)
08:11 PM Ruby Bug #10209: attr_reader vulnerability
Output:
~~~
"Original atributes:"
"-------------------------"
"value"
[1, 2, 3, 4]
{:name=>"Carlos", :age=>25}
"-------------------------"
"After Hacking attributes:"
"-------------------------"
""
[]
{}
"-----------------...
crojas (Carlos Luis Rojas Aragonés)
08:08 PM Ruby Bug #10209 (Rejected): attr_reader vulnerability
It is possible to change a read_only class attribute:
~~~ruby
require 'pp'
class Attributes
attr_reader :string, :array, :hash
def initialize
@string = 'value'
@array = [1, 2, 3, 4]
@hash = { name: 'Carlos', age...
crojas (Carlos Luis Rojas Aragonés)

Also available in: Atom