зеркало из https://github.com/github/ruby.git
* doc/security.rdoc: [DOC] ammend symbols section for bug with send [ci-skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
da1330c85a
Коммит
8350b7dc04
|
@ -75,7 +75,8 @@ They are created when modifying code:
|
|||
* defining a method (e.g. with +define_method+),
|
||||
* setting an instance variable (e.g. with +instance_variable_set+),
|
||||
* creating a variable or constant (e.g. with +const_set+)
|
||||
Also, C extensions that have not been updated and are still calling `ID2SYM`
|
||||
Because of a bug, +send+ and +__send__+ also create immortal symbols.
|
||||
Finally, C extensions that have not been updated and are still calling `ID2SYM`
|
||||
will create immortal symbols.
|
||||
|
||||
Don't create immortal symbols from user inputs. Otherwise, this would
|
||||
|
@ -84,7 +85,7 @@ flooding it with unique strings, which will cause memory to grow indefinitely
|
|||
until the Ruby process is killed or causes the system to slow to a halt.
|
||||
|
||||
While it might not be a good idea to call these with user inputs, methods that
|
||||
used to be vulnerable such as +to_sym+, +send+, +respond_to?+,
|
||||
used to be vulnerable such as +to_sym+, +respond_to?+,
|
||||
+method+, +instance_variable_get+, +const_get+, etc. are no longer a threat.
|
||||
|
||||
== Regular expressions
|
||||
|
|
Загрузка…
Ссылка в новой задаче