7.3 Discovering Security Issues

Descripción

TYPO3 CD 2020 (zweite Auflage) Test sobre 7.3 Discovering Security Issues, creado por Pascal Bartl el 09/04/2021.
Pascal Bartl
Test por Pascal Bartl, actualizado hace más de 1 año
Pascal Bartl
Creado por Pascal Bartl hace alrededor de 3 años
0
0

Resumen del Recurso

Pregunta 1

Pregunta
What is wrong with the following code? (1) public function showAction() { $arguments = $this->request->getArguments(); $template = $arguments['template']; if ($template) { include $template . '.php'; } else { include 'default_template.php'; } ... }
Respuesta
  • The method call should read getArgument('template')
  • The hasArgument() function should be used to check whether the argument exists
  • The require function should be used, rather than include
  • A “path traversal” can be injected via the GET/POST argument
  • Extbase should check whether the file exists before including it

Pregunta 2

Pregunta
Which statement about the following code in an Extbase repository is correct? (1) public function selectByPid($pid) { $query = $this->createQuery(); $select = "SELECT uid FROM table WHERE pid = " . $pid; return $query->statement($select)->execute(true); }
Respuesta
  • The method execute() does not accept a parameter
  • The parameter of method statement() can not be a native SQL query
  • The code shows a possible SQL injection vulnerability
  • The code is perfectly fine
  • Method names in repository classes must not start with selectBy
Mostrar resumen completo Ocultar resumen completo

Similar

7 Técnicas para Aprender Idiomas
maya velasquez
Presidentes deMéxico (1964-2018)
Raúl Fox
Psicología Sistémica
Ricardo Alonso Varela Omodeo
Freud: Pasión Secreta
Cesar_Adolfo
Los 10 Mandamientos del Abogado
maya velasquez
MAPAS CONCEPTUALES DIGITALES
Ana Maria Orozco
01 - Contexto histórico del Renacimiento
Jesús Aguado Álvarez
Getting started with GoConqr Groups
GoConqr Team-Liliana
VOCABULARIO DE INGLÉS
Sandra Molina Garcia
Las Hipótesis
NEIL BERNAL R.
ANATOMÍA...
Ulises Yo