Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Good Coms & Capcha #712

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open

Good Coms & Capcha #712

wants to merge 20 commits into from

Conversation

sudwebdesign
Copy link
Contributor

https://forum.pluxml.org/discussion/comment/64676/#Comment_64676
Avec ce patch tout va, même le capcha

Vérifiés :

  • Lorsqu'un ancien article autorise les coms alors que la config est a non : impossible de commenter
  • Commentaire (classique et avec mdp) passe bien en modération si configuré ainsi
  • Même possibilités de caractères entre l'administration et le public
  • Après un nouveau com publié, il s'affiche (si non modéré) ainsi que le formulaire

+include typo
+plx_session_start
…class.plx.motor.php on line 1081

Call Stack
1	0.0002	375056	{main}( )	.../index.php:0
2	0.0984	975712	plxMotor->demarrage( )	.../index.php:31
3	0.0985	976488	plxMotor->newCommentaire( $artId = '0002',
$content = ['name' => 'tiptop', 'mail' => 'contact@pluxml.orge', 'site'
=> 'http://www.pluxml.orgs', 'content' => 'Ma réponse com',
'capcha_token' => '18d244914785d45d320bf5dd5be54b5868889f3a', 'rep' =>
'l', 'parent' => '5'] )	.../class.plx.motor.php:403

Location: http://localhost/article2/nouvel-article#c0002-6
Fix index 'login' undefined on public post
More secure, $retour be set of lang var when error
if unedited old art have allow_com > 0 but global = 0
articleAllowComs block new comment & form [like previous
PluXml](https://github.com/pluxml/PluXml/blob/5.8.9/core/lib/class.plx.motor.php#L313)
Fix site² + same as frontend : StrCheck to allow more chars
@bazooka07 bazooka07 requested review from bazooka07 and removed request for bazooka07 January 23, 2024 17:57
Note :
Only unicode alphanumeric characters allowed for author of com
This prevent blank author name in xml
when it begin with '<a' & unclosed like '<a my pseudo'

+ Up to allow 50 characters for author input in frontend
+ More html tags allowed in com content
# On genere le contenu de notre fichier XML
ob_start();
?>
<comment>
<author><![CDATA[<?= plxUtils::cdataCheck($content['author']) ?>]]></author>
<author><?= plxUtils::strCheck(preg_replace('~(\W)~u',' ',$content['author']), true, '') ?></author>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testé avec les caractères cyrilliques :
бвгджзклмнпрстфхцчшщ аеёиоуыэюя
БВГДЖЗКЛМНПРСТФХЦЧШЩ АЕЁИОУЫЭЮЯ
ЙЎЁЇЃЌ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant