I am new at Drupal and SQL so forgive me if this is incorrect.

I have Drupal (4.6) set up on a linux server on a LAN with a windows XP workstation. I was logged in to my Drupal site using firefox and editing a page as number 1 user. I then started Internet explorer and using a dialup account, accessed a page on the internet and copied some PHP code. I switched back to the firefox browser and pasted the code into one of my pages and saved the changes.

I dont understand how the Drupal authorisation system works but when saving those changes it appears to have updated the owner of the page (I assume to the dialup user) as I am now unable to edit it. I can still edit all my other pages. I have tried to log on as the user of the dialup account but it says I am not an authorised user.

First is there a way for me to gain access to that page again and second it would appear that before saving the changes to a page that drupal should check that user has those rights.

Comments

greggles’s picture

Status: Active » Closed (fixed)

If you pasted the change in the firefox session where user1 was logged in, then the node should be created with that users name associated with it (unless you edited the author field). Also, you should be able to edit the node using the login that is user 1.

If the PHP is particularly bad in some way, it may be screwing up your ability to edit that page completely outside of drupal. Using HTML and even moreso using PHP inside of your nodes can cause unexpected results in the rest of your page layout and in the function of that page. My recommendation rather than trying to edit that page is to go to admin/node and delete the page and then create the page over from the beginning.

I know you entered this as a support request - I can see possible actual code changes that might be recommended to remove this problem like
1. don't allow PHP input filter
2. sanitize HTML in nodes before storing it
or some variation on those, but they are not likely to be accepted, so if you can use my workaround to fix that particular page then this issue should probably be closed. If you still have a problem or see another feature that we may want to add to Drupal, feel free to stipulate it and change the status.

Regards,
Greg