Page Index Toggle Pages: 1
Topic Tools
Hot Topic (More than 10 Replies) Parsing Error with Parentheses and "%" Character (Read 3,137 times)
George Maschke
Full Member
***
Offline



Posts: 315
Parsing Error with Parentheses and "%" Character
Oct 27th, 2012 at 10:28am
Post Tools
In YaBB 2.4, when I attempt to make a post including the following text:

Code
Select All
(50%) 



a 406 error results with the following message:

Quote:
Not Acceptable

An appropriate representation of the requested resource /cgi-bin/forums/YaBB.pl could not be found on this server.
« Last Edit: Oct 27th, 2012 at 10:29am by George Maschke »  

Back to top
IP Logged
 
George Maschke
Full Member
***
Offline



Posts: 315
Re: Parsing Error with Parentheses and "%" Character
Reply #1 - Oct 27th, 2012 at 11:57am
Post Tools
If you'd like to try this out, you can post a test message on the "off-topic" forum of my message board (guest posting is enabled). Posting is not necessary to view the bug; preview also generates the 406 error message:

https://antipolygraph.org/cgi-bin/forums/YaBB.pl?board=off
« Last Edit: Oct 27th, 2012 at 12:25pm by George Maschke »  

Back to top
IP Logged
 
Dandello
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 2,431
Location: Earth

YaBB 2.6.1
Re: Parsing Error with Parentheses and "%" Character
Reply #2 - Oct 27th, 2012 at 2:40pm
Post Tools
This bug does not appear in 2.5AE or 2.5.2 - It was obviously one of the ones that got fixed during the 2.5 build.

  

If you only have one solution to a problem you're not trying hard enough!
Back to top
WWW  
IP Logged
 
Bill Myers
God Member
Beta Testers
*****
Offline



Posts: 1,706
Location: Los Angeles

YaBB 2.4
Re: Parsing Error with Parentheses and "%" Character
Reply #3 - Oct 28th, 2012 at 1:51am
Post Tools
Hi George,

Just so you know, the error I got in your forum using Firefox was as follows:

Code
Select All
Not Acceptable

An appropriate representation of the requested resource /cgi-bin/forums/YaBB.pl could not be found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. 


Like you, I use YaBB 2.4 and the problem you describe didn't happen in our forum. I think you may have a "mod_security" problem, i.e., you may need to have your host disable it (I don't know if you can modify this in YaBB).

From what I've read, this problem doesn't seem to be related to YaBB. It might help to read this post (and go back two posts as well).

Good luck!

« Last Edit: Oct 28th, 2012 at 1:54am by Bill Myers »  

Morning, noon, or night, have a great one!

Note: This forum doesn't allow for us to freely edit our posts or topics to make corrections as needed, so please remember to look for subsequent posts if you see any mistakes or outdated information. Sorry for the inconvenience.
Back to top
IP Logged
 
Dandello
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 2,431
Location: Earth

YaBB 2.6.1
Re: Parsing Error with Parentheses and "%" Character
Reply #4 - Oct 28th, 2012 at 8:06am
Post Tools
Thanks Bill - I'd never heard of this error in YaBB and while I can confirm the problem exists in the OP's forum, I couldn't confirm it anywhere else. Possibly JonB can shed some light on this one.
  

If you only have one solution to a problem you're not trying hard enough!
Back to top
WWW  
IP Logged
 
depablo
YaBB Moderators
YaBB Next Team
Beta Testers
***
Offline



Posts: 577
Location: UK

None
Re: Parsing Error with Parentheses and "%" Character
Reply #5 - Oct 28th, 2012 at 9:41am
Post Tools
It does not happen on my test 2.4 forum. Bill may be correct that it is server side / host related, maybe host has changed something?
I was also thinking illegal character etc or the way board / categories where named.

So much historical data lost, if only you could access it   Sad
  

Taking a peek behind the mask Wink
Back to top
 
IP Logged
 
Bill Myers
God Member
Beta Testers
*****
Offline



Posts: 1,706
Location: Los Angeles

YaBB 2.4
Re: Parsing Error with Parentheses and "%" Character
Reply #6 - Oct 28th, 2012 at 3:14pm
Post Tools
Dandello, thanks for confirming that this isn't a YaBB problem. I figured you'd know, so it's good to get that confirmation. As for JonB being able to shed some light on the 406 error in George's forum, he's as well versed in Apache as you are in YaBB, so I'm guessing a solution will be forthcoming.

I don't know if this will help, but here on this page I read, "'Not acceptable! Error 406' occurs due to Mod Security updates on the server." There's a suggested .htaccess modification on that page, but I didn't want to copy it here since I don't have the knowledge to know that it would work.

So JonB, maybe you can get your Apache skills working here, and give us some schooling about what may have happened. From what I can tell, it seems that George's host may have changed his server's security settings.

Here in YaBB's own forum there's a discussion about 406 errors (and a solution I think). As John pointed out, some of the associated data is missing, but maybe it can be updated with a link to this topic so that others can also be helped.

For me personally, my solution would have been to have my host change the mod_security settings for our server.  Wink

Edited:
P.S. I found it helpful reading through ALL of this topic here in YaBB's forum (same topic as the one referenced above)

« Last Edit: Oct 28th, 2012 at 3:23pm by Bill Myers »  

Morning, noon, or night, have a great one!

Note: This forum doesn't allow for us to freely edit our posts or topics to make corrections as needed, so please remember to look for subsequent posts if you see any mistakes or outdated information. Sorry for the inconvenience.
Back to top
IP Logged
 
Dandello
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 2,431
Location: Earth

YaBB 2.6.1
Re: Parsing Error with Parentheses and "%" Character
Reply #7 - Oct 28th, 2012 at 4:26pm
Post Tools
There is, in Subs.pl, a commented out sub routine that was written to address problems with mod_security. (So obviously this isn't a new problem.)

But the fix relates to URL issues.

However - it might help (I can't test this) to convert the '%' into an html character.

For that
Open Subs.pl and find
Code
Select All
sub ToHTML { 


above the final '}' add
Code
Select All
	$_[0] =~ s/%/%/g;
 



Then in
Code
Select All
sub FromHTML { 


add:
Code
Select All
	$_[0] =~ s/%/%/g;
 

at the top of the list.

As I indicated, I can't test this. But if it does work, please let us know.

Edited:
And while this may not be a 'YaBB problem', if the above code works, then YaBB has a fix.
« Last Edit: Oct 28th, 2012 at 5:14pm by Dandello »  

If you only have one solution to a problem you're not trying hard enough!
Back to top
WWW  
IP Logged
 
Bill Myers
God Member
Beta Testers
*****
Offline



Posts: 1,706
Location: Los Angeles

YaBB 2.4
Re: Parsing Error with Parentheses and "%" Character
Reply #8 - Oct 28th, 2012 at 5:26pm
Post Tools
How sweet it must be to read and write Perl. I can barely get by, kind of like the Spanish I used to speak so well. A great deal of it has been lost by me, but at least I can have a bit of a conversation with it.

Spanish; Perl; it's all Greek to me.  Grin
  

Morning, noon, or night, have a great one!

Note: This forum doesn't allow for us to freely edit our posts or topics to make corrections as needed, so please remember to look for subsequent posts if you see any mistakes or outdated information. Sorry for the inconvenience.
Back to top
IP Logged
 
Dandello
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 2,431
Location: Earth

YaBB 2.6.1
Re: Parsing Error with Parentheses and "%" Character
Reply #9 - Oct 28th, 2012 at 5:57pm
Post Tools
The complicating issue with YaBB is that it isn't just Perl. It's a combination of Perl, html/css and javascript - and sometimes there are collisions between the languages. That '( 50%)' string is a perfectly valid and utterly innocuous in html and css. But not in Perl with mod_security turned on - even though where that string shows up shouldn't be rendered as anything but static text. (YaBB knows not to parse that string as a Perl function, mod_security doesn't know that YaBB knows.)

There are a couple places where the javascript to do really simple looking things requires deprecated tags in the html to work - so the html doesn't validate to strict. Oh well.  Wink

  

If you only have one solution to a problem you're not trying hard enough!
Back to top
WWW  
IP Logged
 
malmklang2
Jr. Developer
Language Team
***
Offline



Posts: 257
Location: Norway

None
Re: Parsing Error with Parentheses and "%" Character
Reply #10 - Oct 28th, 2012 at 9:58pm
Post Tools
It won't validate towards strict on account of the alt attribute being omitted from image tags like the reply buttons, mark and quote buttons etc...  either.... I'm not sure anymore if is allowed omitted in transitional even, cause it's been so long since I stopped not using the alt attribute Tongue

Anyways, the alt thing is hm, important for reading impaired users, or people, and shouldn't be left out. That being said, I should've checked before I did the button files,cause I could've avoided rewriting and kerning a whee bit on a few terms/strings there, and instead made the buttons a little wider Tongue
« Last Edit: Oct 28th, 2012 at 10:00pm by malmklang2 »  

if ($human) {die("Sorry, you lot have destroyed too much already")}
Back to top
IP Logged
 
Dandello
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 2,431
Location: Earth

YaBB 2.6.1
Re: Parsing Error with Parentheses and "%" Character
Reply #11 - Oct 28th, 2012 at 10:15pm
Post Tools
On the next iteration that's one of the things we'll be looking at - proper alt tags and having 'alt=""' for the things that don't need alt text.

But the issue I'm referring to is using the name tag for images. The name tag is now restricted to forms, but there are rollovers that need that name tag as an identifier. I'm sure there's a workaround - somewhere.
« Last Edit: Oct 28th, 2012 at 10:18pm by Dandello »  

If you only have one solution to a problem you're not trying hard enough!
Back to top
WWW  
IP Logged
 
malmklang2
Jr. Developer
Language Team
***
Offline



Posts: 257
Location: Norway

None
Re: Parsing Error with Parentheses and "%" Character
Reply #12 - Oct 28th, 2012 at 11:05pm
Post Tools
I'm pretty sure rollovers will take the id attribute instead of name Smiley
  

if ($human) {die("Sorry, you lot have destroyed too much already")}
Back to top
IP Logged
 
George Maschke
Full Member
***
Offline



Posts: 315
Re: Parsing Error with Parentheses and "%" Character
Reply #13 - Jan 5th, 2013 at 7:27am
Post Tools
Apologies for the late update! The culprit turned out to be mod_security.
  

Back to top
IP Logged
 
Dandello
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 2,431
Location: Earth

YaBB 2.6.1
Re: Parsing Error with Parentheses and "%" Character
Reply #14 - Jan 5th, 2013 at 3:53pm
Post Tools
Glad it got sorted out.
  

If you only have one solution to a problem you're not trying hard enough!
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Topic Tools
 
  « Board Index ‹ Board  ^Top