Welcome Guest! To enable all features please Login or Register.
Options
View
Go to last post Go to first unread
Offline parkerseal  
#1 Posted : Tuesday, August 29, 2017 10:26:30 AM(UTC)
parkerseal


Rank: YAF Camper

Reputation:

Joined: 12/13/2013(UTC)
Posts: 11

Thanks: 3 times
Was thanked: 1 time(s) in 1 post(s)
I think this is a new one! The full error is:
Quote:
Server Error in '/' Application.

Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.

Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.]
System.Text.StringBuilder.AppendFormat(IFormatProvider provider, String format, Object[] args) +14313641
System.String.Format(IFormatProvider provider, String format, Object[] args) +136
YAF.Pages.postmessage.PostReply_Click(Object sender, EventArgs e) +2432
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3804

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.36392


To recreate: login as a normal, non-moderator, non-admin user with a low message count, and try to post a message with lots of urls.

The relevant source code is postmessage.ascx.cs, and I think it's here:
Code:
                    var spamResult = "The user posted {0} urls but allowed only {1}".FormatWith(
                        urlCount,
                        this.PageContext.BoardSettings.AllowedNumberOfUrls);

                    switch (this.PageContext.BoardSettings.SpamMessageHandling)
                    {
                        case 0:
                            this.Logger.Log(
                                this.PageContext.PageUserID,
                                "Spam Message Detected",
                                "Spam Check detected possible SPAM ({1}) posted by User: {0}".FormatWith(
                                    this.PageContext.IsGuest ? this.From.Text : this.PageContext.PageUserName),,
                        this.PageContext.BoardSettings.AllowedNumberOfUrls);
...

Need to add spamMessage to the FormatWith parameters!
It doesn't get as far as logging "Spam Message Detected"

The workaround would be to increase BoardSettings.AllowedNumberOfUrls but I can't find it in the admin user interface

YAF Version 2.2.4.1 (almost current!)
Geoff

Edited by user Tuesday, August 29, 2017 10:31:47 AM(UTC)  | Reason: found the bug

Sponsor
Offline tha_watcha  
#2 Posted : Tuesday, August 29, 2017 11:48:39 AM(UTC)
tha_watcha


Rank: YAF.NET Project Lead

Reputation:

Medals: Medal of Honor: Portal Puzzle Master: Portal Puzzle Master for DNNMedal of Honor Key: Given to pillars of the community who are key players in the YAF community and project.DNN Master: DNN Module ManBug Killer Medal of Honor: Medal for being a kick-ass bug killer!Medal of Honor for the Support King: Support King! Amazing asset to the YAF.NET Community.

Joined: 3/6/2010(UTC)
Posts: 3,664
Germany

Thanks: 70 times
Was thanked: 1140 time(s) in 970 post(s)
Thanks fixed this in the latest commit

https://github.com/YAFNE...83f1c8eab2a03d0f6679acab

Will be included in the next release (YAF 2.2.4.3 or 2.3.0)

Quote:
The workaround would be to increase BoardSettings.AllowedNumberOfUrls but I can't find it in the admin user interface


The Setting can be found in the Host Settings under Bot Spam Settings (User Checking) > Allowed Number of URLs before flagged as SPAM
Rss Feed  Atom Feed
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Notification

Icon
Error