mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 14:31:26 +00:00
Merge branch 'staging' of github.com:mbliznikova/pixelfed into staging
This commit is contained in:
commit
170f877c26
2 changed files with 8 additions and 0 deletions
|
@ -45,6 +45,7 @@
|
||||||
- Update AccountImport ([5a2d7e3e](https://github.com/pixelfed/pixelfed/commit/5a2d7e3e))
|
- Update AccountImport ([5a2d7e3e](https://github.com/pixelfed/pixelfed/commit/5a2d7e3e))
|
||||||
- Update ImportPostController, fix IG bug with missing spaces between hashtags ([9c24157a](https://github.com/pixelfed/pixelfed/commit/9c24157a))
|
- Update ImportPostController, fix IG bug with missing spaces between hashtags ([9c24157a](https://github.com/pixelfed/pixelfed/commit/9c24157a))
|
||||||
- Update ApiV1Controller, fix mutes in home feed ([ddc21714](https://github.com/pixelfed/pixelfed/commit/ddc21714))
|
- Update ApiV1Controller, fix mutes in home feed ([ddc21714](https://github.com/pixelfed/pixelfed/commit/ddc21714))
|
||||||
|
- Update AP helpers, improve preferredUsername validation ([21218c79](https://github.com/pixelfed/pixelfed/commit/21218c79))
|
||||||
- ([](https://github.com/pixelfed/pixelfed/commit/))
|
- ([](https://github.com/pixelfed/pixelfed/commit/))
|
||||||
|
|
||||||
## [v0.11.9 (2023-08-21)](https://github.com/pixelfed/pixelfed/compare/v0.11.8...v0.11.9)
|
## [v0.11.9 (2023-08-21)](https://github.com/pixelfed/pixelfed/compare/v0.11.8...v0.11.9)
|
||||||
|
|
|
@ -760,6 +760,13 @@ class Helpers {
|
||||||
if(!isset($res['preferredUsername']) && !isset($res['nickname'])) {
|
if(!isset($res['preferredUsername']) && !isset($res['nickname'])) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// skip invalid usernames
|
||||||
|
if(!ctype_alnum($res['preferredUsername'])) {
|
||||||
|
$tmpUsername = str_replace(['_', '.', '-'], '', $res['preferredUsername']);
|
||||||
|
if(!ctype_alnum($tmpUsername)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
$username = (string) Purify::clean($res['preferredUsername'] ?? $res['nickname']);
|
$username = (string) Purify::clean($res['preferredUsername'] ?? $res['nickname']);
|
||||||
if(empty($username)) {
|
if(empty($username)) {
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue