Substr in [code] section bug out? [possibly my own browser]

  • Thread starter Thread starter jbriggs444
  • Start date Start date
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
13 replies · 2K views
Messages
13,438
Reaction score
8,110
Code:
s u b s t r($a,0,1)
I was attempting to preview before posting.
1656590482182.png
 
  • Like
Likes   Reactions: Wrichik Basu
Physics news on Phys.org
Can confirm. Putting the s back into the below causes the "Oops" dialog when I attempt to preview - Firefox on Android.
Code:
subtr($a,0,1)
 
  • Like
Likes   Reactions: jbriggs444
Greg Bernhardt said:
Code:
subtr($a,0,1)

works ok for me
When I attempt to preview this I get:
1656598559969.png

If I attempt to post without preview, I get the same until removing the s.
Same if attempting to Save after edit.
 
Same problem here. Firefox on Ubuntu.

It's actually the string substr() that creates the bug. With or without characters within the brackets; within BBcode or not.

(I actually inserted a non-printable character between the s and the u to be able to publish this post)
 
  • Like
Likes   Reactions: Wrichik Basu
It looks like I can preview a post containing the forbidden word once (in CODE tags or not), then get the error on anything I try to post (containing the string or not) on a subsequent try. Refreshing the page resets it. Did you try previewing more than once, @Greg Bernhardt?

I'll try on my laptop this evening and see if the browser console says anything - don't think I've got a console in 'Droid Firefox.
 
I checked the console and it is a Cloudflare problem:

Code:
XHR POST https://www.physicsforums.com/threads/substr-in-code-section-bug-out-possibly-my-own-browser.1016515/reply-preview
[HTTP/2 403 Forbidden 45ms]

Followed by an HTML page (yes, in the console) that reads (error set at core-compiled.js:3:1515):

Please enable cookies.
Sorry, you have been blocked
You are unable to access physicsforums.com
Why have I been blocked?

This website is using a security service to protect itself from online attacks. The action you just performed triggered the security solution. There are several actions that could trigger this block including submitting a certain word or phrase, a SQL command or malformed data.
What can I do to resolve this?

You can email the site owner to let them know you were blocked. Please include what you were doing when this page came up and the Cloudflare Ray ID found at the bottom of this page.

Cloudflare Ray ID: 723865b31e5d713f • Your IP:

[my IP address redacted] • Performance & security by Cloudflare

I was unable to paste the actual HTML code as I was getting another console error:

 
  • Like
  • Informative
Likes   Reactions: mfb, Greg Bernhardt and Wrichik Basu
@Greg Bernhardt same issue here with some combinations of "c h a r ( )".

As above the proper fix is for Zenforo to change from Content-type: multipart/form-data to application/json, otherwise you will be patching CDN filter exceptions for ever (or can you just remove the filter altogether: I can't imagine Zenforo is vulnerable to script injection in 2022)?