Regexp generated from unescaped input in #expand_class
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 1/5
- Tiempo estimado
- Menos de una hora
- Aptitud para principiantes
- 25/100
Línea de trabajo
The unescaped input is interpolated into a regexp in #expand_class in lib/rdoc/ri/driver.rb, near line 972, and #expand_name (around line 998) calls it. Other regexps in that file escape their input, so compare with those. Pull request #1846 is already open against this issue, so review it before starting. Done means $\ no longer triggers the 'has ']' without escape' warning in tab completion, and the input is escaped the same way as elsewhere in driver.rb.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
It happens here:
For example, when typing $ into IRB and then hitting tab to go through the autocomplete suggestions, this prints the following warning once $\ is reached.
rdoc/ri/driver.rb:972: warning: regular expression has ']' without escape: /\A$\[^:]*\z/
Backtrace:
rdoc-8.1.0/lib/rdoc/ri/driver.rb:998:in 'RDoc::RI::Driver#expand_name'
irb-1.18.0/lib/irb/input-method.rb:410:in 'IRB::RelineInputMethod#rdoc_dialog_contents'
irb-1.18.0/lib/irb/input-method.rb:378:in 'block in IRB::RelineInputMethod#show_doc_dialog_proc'
This happens because $\ is embedded unescaped into the regexp, generating /\A$\[...].../.
Perhaps a crafty actor could even inject a Regexp that times out or raises a RegexpError.
All other regexps generated in driver.rb use escaped input, so I assume it is just an oversight in this case.
- Lenguaje dominante
- Ruby
- Estrellas
- 927
- Forks
- 467
- Merge medio
- 23 h 47 min
- PR fusionados (30 d)
- 12
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de ruby/rdoc
-
RDoc 8.0.0 gem omits `doc/rdoc/example.rb`, which is referenced by the packaged markup documentationPosiblemente ocupada @OskarEichler la tomó hace 43 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
ruby/rdoc#1759 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 68/100
ruby/rdoc#1823 · 5 comentarios ·
Los mantenedores suelen responder en 1 día
-
Wrong heading levels in generated HTML?Posiblemente ocupada @st0012 la tomó hace 8 días. Abiertobug
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
ruby/rdoc#1822 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
ruby/rdoc#1819 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Homebrew/homebrew-core#317477 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
bug help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
hanami/hanami-cli#453 ·
-
area/web interface
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
mastodon/mastodon#41009 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
yegor256/ellipsized#131 ·