-
-
Notifications
You must be signed in to change notification settings - Fork 253
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
Images not displaying because of sanitize in FaqHelper.php #2497
Comments
Removing this line of code opens potential security risks. |
ok but I guess the sanitize function has to be reviewed because keeping it there breaks the display of html whenever they are images. |
Yes, will work on it after my holiday |
The sanitize problem is also present in 3.2.0-RC, although it behaves a little different: Images are partially displayed, but then suddenly rest of the image and rest of the articles content is cut off... commenting it out makes everything work... |
@lagasss @SilentDude80 could you please test this fix: 0a904c1 |
Cannot test in 3.1.14 at the moment, since I have it at my company and now I'm on holidays too and have no access ;-)
|
You can't use that fix for 3.2 as we switched libraries for 3.2 |
@SilentDude80 This is the fix for 3.2: 5495a55 |
Does not work, unfortunately:
|
@SilentDude80 please try to revert to the original version of the file and try it again. I just added the missing options to reduce the impact of the sanitizer |
Ich muss jetzt mal auf Deutsch schreiben - Ich habe jetzt die ganze FaqHelper-Datei durch die von GitHub ersetzt... Mit einem kleinen Bild (das Logo von phpMyFAQ, also so Icon-Größe) hat es funktioniert. Sobald ich aber ein bissl größeres Bild verwende, kriege ich komische Fehlermeldungen: Habs aber überprüft - das Bild, welches ich per Copy&Paste eingefügt habe, ist fehlerfrei im /images-Ordner gelandet. Beim Testen ist mir auch noch aufgefallen, dass wenn ich diesen Test-Artikel bearbeite und speichere, verschwindet er mir von der Startseite, ist also weder in dem Bereich "Neue FAQs" zu sehen wie vor dem Bearbeiten, noch kann ich mich über die Kategorie durchhangeln - ist wie von der Bildfläche verschwunden. Nur über den Admin-Bereich komme ich dann noch in den Bearbeitungsmodus des Artikels... das ist aber wohl ein Fall für eine separate Fehlermeldung... |
@SilentDude80 Der Screenshot hat aber nichts mit dem Bug zu tun. |
@SilentDude80 Ich habe das nun mal mit einem sehr großen Bild (3,5 MB groß) probiert. Per Drag n Drop kommen Fehlermeldungen von TinyMCE, der Sanitizer verschluckt sich auch dran. Per Upload geht es und der Sanitizer stellt es dann auch dar. Der Commit fixt die Fehlermeldungen. Um es selbst zu testen, musst du aber den JavaScript-Code neu bauen. |
Ich weiß, das liegt daran, dass ich im Moment damit kämpfe, überhaupt noch meine FAQ-Artikel angezeigt zu bekommen, um den Fix vom eigentlichen Bug testen zu können: Angeblich 4 FAQs in der Kategorie - angezeigt wird aber nix... Freigeschaltet/veröffentlicht sind sie alle: Und obwohl auch drei FAQs als wichtig markiert sind, herrscht auf der Startseite in den Bereichen "Wichtige FAQs" und "Neueste FAQ-Beiträge" gähnende Leere: |
Könnte ich einen Dump deiner DB haben? |
Klar: Was mir noch aufgefallen ist: Ist "Aktiv/Inaktiv" eigentlich dasselbe wie "Veröffentlicht/Unveröffentlicht" im Editor ? |
Danke für den Dump, ich schau die Tage rein.
ja, es könnte sein, dass das bereits gefixt ist. Ich denke, wir brauchen nen 2. RC |
Falls es schon gefixt ist - wäre es dann besser ich installiere noch mal den 3.2-Branch von Github ? Die Installation bei mir basiert nämlich auf "https://download.phpmyfaq.de/phpMyFAQ-3.2.0-RC.tar.gz" |
@SilentDude80 ja, gerne, aber dann musst du mittels Composer und Yarn die externen Bibliotheken installieren und bauen. |
Ok, null Ahnung davon - dann warte ich lieber auf RC2 ;-) |
@SilentDude80 Bug gefunden, ist bereits in der kommenden RC.2 gefixt. |
Merci :-) |
@thorsten, I inserted your fixed method cleanUpContent to our running 3.1.14 and the pictures are shown again. Without that fix they had been missing. |
Describe the bug
Images not displaying because of sanitize in FaqHelper.php if I comment, it works again.
Screenshots
phpMyFAQ (please complete the following information):
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: