Skip to content

Commit

Permalink
fix: add missing check on special characters for page ID
Browse files Browse the repository at this point in the history
  • Loading branch information
thorsten committed Oct 21, 2022
1 parent ec1e48c commit 372428d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions phpmyfaq/admin/ajax.config.php
Expand Up @@ -203,8 +203,8 @@
$entity = new MetaEntity();

$entity
->setPageId(Filter::filterInput(INPUT_GET, 'page_id', FILTER_UNSAFE_RAW))
->setType(Filter::filterInput(INPUT_GET, 'type', FILTER_UNSAFE_RAW))
->setPageId(Filter::filterInput(INPUT_GET, 'page_id', FILTER_SANITIZE_SPECIAL_CHARS))
->setType(Filter::filterInput(INPUT_GET, 'type', FILTER_SANITIZE_SPECIAL_CHARS))
->setContent(Filter::filterInput(INPUT_GET, 'content', FILTER_SANITIZE_SPECIAL_CHARS));

$metaId = $meta->add($entity);
Expand Down
2 changes: 1 addition & 1 deletion phpmyfaq/admin/meta.edit.php
Expand Up @@ -56,7 +56,7 @@
<div class="form-group row">
<label for="page_id" class="col-sm-2 col-form-label"><?= $PMF_LANG['ad_meta_page_id'] ?></label>
<div class="col-sm-10">
<input type="text" class="form-control" name="page_id" value="<?= $metaData->getPageId() ?>" required>
<input type="text" class="form-control" name="page_id" maxlength="48" value="<?= $metaData->getPageId() ?>" required>
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion phpmyfaq/admin/meta.php
Expand Up @@ -135,7 +135,7 @@
<div class="form-group row">
<label for="page_id" class="col-sm-2 col-form-label"><?= $PMF_LANG['ad_meta_page_id'] ?></label>
<div class="col-sm-10">
<input type="text" class="form-control" id="page_id" required>
<input type="text" class="form-control" id="page_id" maxlength="48" required>
</div>
</div>

Expand Down

0 comments on commit 372428d

Please sign in to comment.