Page Index Toggle Pages: 1
Topic Tools
Normal Topic URL Encoding (Ban Email and Attachments) (Read 2,116 times)
Dandello
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 2,262
Location: Earth

YaBB 2.6.0
Re: URL Encoding (Ban Email and Attachments)
Reply #6 - Nov 6th, 2012 at 9:31pm
Post Tools
This Topic was moved here from YaBB 2 - Bugs [Need Verification] [move by] Dandello.
  

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



Posts: 2,262
Location: Earth

YaBB 2.6.0
Re: URL Encoding (Ban Email and Attachments)
Reply #5 - Aug 22nd, 2012 at 3:56pm
Post Tools
Off-Topic replies have been moved to this Topic.
  

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



Posts: 1,269
Location: United Kingdom

None
Re: URL Encoding (Ban Email and Attachments)
Reply #4 - Aug 22nd, 2012 at 12:31am
Post Tools
No probs.

It's allowed to register with a + symbol in usernames, so it needs to be added for banning usernames from the view profile page too:

In Profile.pl find:

Code (Perl)
Select All
        if ($is_banned =~/U/) { $ban_user_link = qq~<a href="$adminurl?action=ipban3;ban_memname=$useraccount{$user};username=$useraccount{$user};unban=1"><span class="small">[$profile_txt{'903'}]</span></a>~; }
        else { $ban_user_link = qq~<a href="$adminurl?action=ipban3;ban_memname=$useraccount{$user};username=$useraccount{$user}"><span class="small">[$profile_txt{'906'}]</span></a>~; } 


And replace with:

Code (Perl)
Select All
        $ban_user_name = $useraccount{$user};
        $ban_user_name =~ s/([^A-Za-z0-9])/sprintf("%%%02X", ord($1))/seg;
        if ($is_banned =~/U/) { $ban_user_link = qq~<a href="$adminurl?action=ipban3;ban_memname=$ban_user_name;username=$useraccount{$user};unban=1"><span class="small">[$profile_txt{'903'}]</span></a>~; }
        else { $ban_user_link = qq~<a href="$adminurl?action=ipban3;ban_memname=$ban_user_name;username=$useraccount{$user}"><span class="small">[$profile_txt{'906'}]</span></a>~; } 

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



Posts: 2,262
Location: Earth

YaBB 2.6.0
Re: URL Encoding (Ban Email and Attachments)
Reply #3 - Aug 22nd, 2012 at 12:02am
Post Tools
Thanks Derek. With any luck I can have these 'adjustments' made before Thursday.
  

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



Posts: 1,269
Location: United Kingdom

None
Re: URL Encoding (Ban Email and Attachments)
Reply #2 - Aug 21st, 2012 at 9:27pm
Post Tools
The attachment file names should be encoded in the message index pop-up too.

In Sources/Downloads.pl find:

Code (Javascript)
Select All
        window.open('$scripturl?action=downloadfile;file=' + amfn,'_blank'); 


And replace with:

Code (Javascript)
Select All
        window.open('$scripturl?action=downloadfile;file=' + encodeURIComponent(amfn),'_blank'); 


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



Posts: 3,816
Location: Land of the Blazing Sun!

YaBB 2.6.0
Re: URL Encoding (Ban Email and Attachments)
Reply #1 - Aug 21st, 2012 at 9:15pm
Post Tools
Thanks very much Derek -

Cool
  

I find your lack of faith disturbing.
Back to top
IP Logged
 
Derek Barnstorm
Support Team
YaBB Next Team
Development Team
Beta Testers
****
Offline



Posts: 1,269
Location: United Kingdom

None
URL Encoding (Ban Email and Attachments)
Aug 21st, 2012 at 4:54pm
Post Tools
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Topic Tools
 
  « Board Index ‹ Board  ^Top