GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Quiz

7.3 Discovering Security Issues

Gelöschter Nutzer 2 Fragen Aktualisiert am 27 Apr 2022

Quiz starten

Fragen in diesem Quiz (2)

  1. 1What 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';
    }
    ...
    }
    1. AThe method call should read getArgument('template')
    2. BThe hasArgument() function should be used to check whether the argument exists
    3. CThe require function should be used, rather than include
    4. DA “path traversal” can be injected via the GET/POST argument
    5. EExtbase should check whether the file exists before including it
  2. 2Which 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);
    }
    1. AThe method execute() does not accept a parameter
    2. BThe parameter of method statement() can not be a native SQL query
    3. CThe code shows a possible SQL injection vulnerability
    4. DThe code is perfectly fine
    5. EMethod names in repository classes must not start with selectBy

Informationen

Beschreibung
Der Nutzer hat seine Fachbereichs-Information gelöscht. Quiz am 7.3 Discovering Security Issues, erstellt von Gelöschter Nutzer am 27/04/2022.
Autor
Gelöschter Nutzer
Sprache
English
Aufrufe
18
Verlauf
Erstellt am 27 Apr 2022 · aktualisiert am 27 Apr 2022
Bewertung
Noch keine Bewertungen
Bewerte dieses Quiz
Bewerte dieses Quiz

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck