Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 183225 - Convert the people pages to the Phoenix look and feel
Summary: Convert the people pages to the Phoenix look and feel
Status: CLOSED FIXED
Alias: None
Product: WTP Website
Classification: WebTools
Component: website (show other bugs)
Version: unspecified   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Bob Fraser CLA
QA Contact: David Williams CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-19 13:22 EDT by Bob Fraser CLA
Modified: 2007-06-14 16:47 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bob Fraser CLA 2007-04-19 13:22:07 EDT
I am researching the conversion and have some questions on approach.
Comment 1 Bob Fraser CLA 2007-04-19 13:35:42 EDT
There are many people pages.  

Q: How frowned upon are URLs with parameters?
Can we use something like /webtools/people/person.php?name=bfraser and dynamically serve up a Phoenix page from bfraser.xml ?

Or is it better to generate a static php page for each name? eg. bfraser.php
This would mean we would still have to run the build.xml.
Comment 2 Lawrence Mandel CLA 2007-04-19 14:29:42 EDT
Denis (the Eclipse webmaster) expressed concern over accepting parameters. I believe another project was doing this and it was exploited by an attacker. 


In general, I think as long as you perform sufficient checking on the parameter it will be fine. Accepting "bfraser" and having a table that maps that value to braser.xml (not simply appending .xml to the name given though, actually mapping to a completely separate file name so "bfraser" is simply a key in a table) with a suitable default for invalid entries will probably work. 
Comment 3 Bob Fraser CLA 2007-04-19 14:42:18 EDT
Thanks for the input Lawrence.  I was considering "cleaning" the input string with a search/replace that only allowed alpha characters (ie. no .. or / etc)

Oh and keep '-' so we don't lose Bjorn :)

Are there other exploits to worry about with this approach?
Comment 4 Bob Fraser CLA 2007-05-02 18:57:37 EDT
I checked in the first part of the Phoenix conversion for the people pages.
To get a Phoenix page of someone invoke as follows:
/webtools/people/person.php?name=<lastName> (without the <> of course)

I have done the following to avoid any PHP exploits

1) Used the getHTTPParameter function recommended here:
   http://wiki.eclipse.org/index.php/Using_Phoenix#Using_HTTP_Parameters

2) Filtered the input against a white list.  Only a-z and '-' is allowed.
3) '.xml' is appended and we look for the xml file in the local directory.  Only
   if we find a valid file do we proceed.
4) The argument is never used again.  All output is driven from the XML and
   XSLT files.

I invite all peer review of this.

Thanks
Bob
Comment 5 Bob Fraser CLA 2007-05-03 14:01:45 EDT
Added /webtools/people/main.php to generate an index page of contributors
Added /webtools/people/contributors.php to generate the activity index
Fixed all cross references between pages

Try it out and click around

Last step if we all like it is to do the redirects
Comment 6 Bob Fraser CLA 2007-05-03 15:01:57 EDT
WebMaster,

I have a php page that takes an http parameter and I want to make sure everything looks secure.  Can someone please take a look at this?  Comment #4 has all the details.

Thanks,

Bob Fraser
Web Tools Website committer
Comment 7 Denis Roy CLA 2007-05-03 15:20:10 EDT
This looks good to me.  Thanks for asking.
Comment 8 Bob Fraser CLA 2007-05-17 12:50:14 EDT
Cut over to Phoenix enabled people pages.  Added html redirects.  Almost done.  Need to figure out how to handle the redirects of the individual people pages or just leave them.
Comment 9 Bob Fraser CLA 2007-05-31 18:17:23 EDT
Decided to leave the old html pages.  Haven't been able to come up with a nice way to generate the ~90 redirect files.  Came close but one XSLT genereating multiple html files doesn't work for me.

So I think we are done.  Resolving as fixed.
Comment 10 Bob Fraser CLA 2007-06-14 16:46:35 EDT
Added the HTML redirects anyway. The xslt transform assumes the basename of the xml file is the same as person/name/family-name in lowercase.  This was true for the files I checked, but may not always be a safe assumption.

This should not be a problem, since we shouldn't need any new redirects.  People should start using the new php form of the URL.
Comment 11 Bob Fraser CLA 2007-06-14 16:47:56 EDT
Closing