[RFC|Merged] Request Class

These requests for comments/change have lead to an implemented feature that has been successfully merged into the 3.1/Ascraeus branch. Everything listed in this forum will be available in phpBB 3.1.
User avatar
igorw
Registered User
Posts: 500
Joined: Thu Jan 04, 2007 11:47 pm

Re: [RFC|Accepted] Request Class

Post by igorw » Tue Oct 12, 2010 2:16 pm


User avatar
bantu
3.0 Release Manager
3.0 Release Manager
Posts: 557
Joined: Thu Sep 07, 2006 11:22 am
Location: Karlsruhe, Germany
Contact:

Re: [RFC|Accepted] Request Class

Post by bantu » Wed Oct 13, 2010 10:57 pm

There are remaining accesses to $_COOKIE that have to be converted.

User avatar
nickvergessen
Former Team Member
Posts: 733
Joined: Sun Oct 07, 2007 11:54 am
Location: Stuttgart, Germany
Contact:

Re: [RFC|Accepted] Request Class

Post by nickvergessen » Thu Jan 27, 2011 11:24 am

I just used $_POST and got this error-message:

Code: Select all

General Error
Illegal use of $_POST. You must use the request class or request_var() to access input data. Found in E:\phpBB-development\htdocs\phpBB-git\3.1\phpBB\includes\mcp\mcp_main.php on line 664.
This error message was generated
The last sentence is ... it's really confusing me :P I didn't even know, that error-messages have to be generated, I thought they were just there?! :lol:
Member of the Development-TeamNo Support via PM

User avatar
bantu
3.0 Release Manager
3.0 Release Manager
Posts: 557
Joined: Thu Sep 07, 2006 11:22 am
Location: Karlsruhe, Germany
Contact:

Re: [RFC|Accepted] Request Class

Post by bantu » Thu Jan 27, 2011 10:37 pm

Looks like an incomplete sentence. At least I think it wasn't intentional because punctuation is missing.

Code: Select all

afischer@miraculix:/var/www/projects/phpbb3 (develop) phpBB $ grep "This error message was generated" . -R
./includes/request/deactivated_super_global.php:		$message = 'Illegal use of $' . $this->name . '. You must use the request class or request_var() to access input data. Found in %s on line %d. This error message was generated';

User avatar
naderman
Product Manager
Product Manager
Posts: 1727
Joined: Sun Jan 11, 2004 2:11 am
Location: Karlsruhe, Germany
Contact:

Re: [RFC|Accepted] Request Class

Post by naderman » Mon Jan 31, 2011 6:50 pm

I believe the thinking behind that was that PHP itself outputs a file name and line number, but they would reflect that piece of code triggering the error instead of the file and line having actually caused the issue. But apparently your PHP does not output those?

User avatar
igorw
Registered User
Posts: 500
Joined: Thu Jan 04, 2007 11:47 pm

Re: [RFC|Merged] Request Class

Post by igorw » Mon Feb 28, 2011 8:56 am


User avatar
naderman
Product Manager
Product Manager
Posts: 1727
Joined: Sun Jan 11, 2004 2:11 am
Location: Karlsruhe, Germany
Contact:

Re: [RFC|Merged] Request Class

Post by naderman » Mon Feb 28, 2011 11:42 pm

That was actually intentional so that the standard PHP output which appends file and line number would say generated in file xyz on line abc ... I guess this doesn't always work?

User avatar
igorw
Registered User
Posts: 500
Joined: Thu Jan 04, 2007 11:47 pm

Re: [RFC|Merged] Request Class

Post by igorw » Tue Mar 01, 2011 12:04 am

I'm always getting an error message that ends with 'This error message was generated'. PHP 5.3.3.

User avatar
bantu
3.0 Release Manager
3.0 Release Manager
Posts: 557
Joined: Thu Sep 07, 2006 11:22 am
Location: Karlsruhe, Germany
Contact:

Re: [RFC|Merged] Request Class

Post by bantu » Mon Jul 25, 2011 9:52 pm

Would it make sense to get rid of trim() in set_var? See for example http://tracker.phpbb.com/browse/PHPBB3-8713

Oleg
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am
Contact:

Re: [RFC|Merged] Request Class

Post by Oleg » Tue Jul 26, 2011 10:00 am

Mysql does trimming, with that in mind maybe we should keep it.

How about adding a 'password' (or 'raw') field type which will not be trimmed?

My guess is that trimming the username is still ok. Practically speaking, on most installations if someone entered a space before their username by accident I would expect them to want to be logged in anyway, and for those installs where it matters the admin could patch the code to use the password field type for username as well.

Post Reply