vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Restrict Thread Titles to Alpha-Numeric only (https://vborg.vbsupport.ru/showthread.php?t=324054)

Snowhog 12-21-2016 08:13 PM

Restrict Thread Titles to Alpha-Numeric only
 
I'm looking for a MOD that restricts Thread Titles to ONLY alpha (a-z (upper/lower)) and/or numeric (0-9) characters. Why? To prevent the creation of potential SQL injection strings.

We use ZB Block on our Forum, and it's been tremendously effective in keeping spam and spammers out. However, many of our members create Thread Titles using error output (as that's the problem they want to address). Sometimes these titles can be seen by ZB Block (via external search (and on rare occasion, internal search) queries, or by Moderator/Administrator merge actions, as SQL Injection attempts.

By restricting Thread Title characters to alpha-numeric only, we avoid this potential problem.

MarkFL 12-22-2016 06:28 AM

1 Attachment(s)
Try the simple product I have attached. Let me know if you want any changes. :)

Snowhog 12-22-2016 05:29 PM

Downloaded and installed. Will test it and report back.

Snowhog 12-22-2016 05:41 PM

1 Attachment(s)
Well, my first test post allowed non-alphanumeric characters in the Thread Title.

MarkFL 12-22-2016 05:49 PM

1 Attachment(s)
This is what I get if I try to save/edit a post/thread to use a title having non-alphanumeric characters in the title:

https://vborg.vbsupport.ru/attachmen...1&d=1482435984

I'd have to come to your site with an admin account to figure out why it's not working on your site. SO, if you so desire, send by PM the login credentials to an admin account on your site and I'll see if I can find out why.

Snowhog 12-22-2016 06:56 PM

Thank you for your assistance, both in making this MOD (Plugin) and for helping to troubleshoot why it isn't working "here".

For others reading this, I tested this MOD using Apple's Safari browser on my iMac running macOS Sierra (latest/greatest, fully up to date). Using Safari, Thread Titles allows non-alphanumeric characters. But, using Firefox on my Linux OS laptop, this MOD works as designed.

So, Safari chooses 'not to play well with others' it seems. ;)

MarkFL 12-22-2016 07:10 PM

Yes, Safari is one of a few browsers that don't yet support form validation it seems. So, I'll add a fallback method of some sort and post back when I have something for you to test. :)

MarkFL 12-23-2016 10:01 AM

I have posted an update to this product here:

Thread/Post Title Characters

I've cited you as a co-author since this was your idea/request. :)

Snowhog 12-23-2016 07:00 PM

Quote:

Originally Posted by MarkFL (Post 2579779)
I've cited you as a co-author since this was your idea/request. :)

Wow. Thank you for the recognition. I'll download and install the update a little later today and report back on how it fares with Safari.

Snowhog 12-23-2016 07:41 PM

1 Attachment(s)
Tested in our Forum using Apple Safari browser. It works! :happy_dance:


All times are GMT. The time now is 11:41 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01140 seconds
  • Memory Usage 1,727KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete