Jump to content

User talk:Yeidel

Add topic
From Meta, a Wikimedia project coordination wiki
Latest comment: 17 years ago by Catrope in topic Mistake in user page editing patch?

 

User Page Editing -- Anon User Test Removed

[edit]

I removed from the User Page Editing patch the line

+            && $wgUser->getID() != 0 #not anonymous user

The intention was to protect the following $wgUser->getName()from being undefined if the test were run for anonymous users. However, that's not really a problem, since $wgUser->getName() returns the IP number for anonymous users.

In our environment, this line has no impact, since anonymous users are not permitted to edit anything.

However, in an environment where anon users can edit, this line would cause the disqualifying test not to be applied to anon users; thus an anon user could edit any user page.

It was just a mistake that proved to be harmless in our environment, but could be a problem if the code were imported into another environment.

Mistake in user page editing patch?

[edit]
+        if ( NS_USER == $this->mNamespace && $action = 'edit'

Shouldn't that be:

+        if ( NS_USER == $this->mNamespace && $action == 'edit'

--Catrope 12:22, 2 June 2007 (UTC)Reply