The cleanIds method in entity.inc passes any ids provided to the DrupalEntityControllerInterface's load method through the php intval function to turn the string into an integer. The intval function will strip any spaces or zeros at the beginning of a string to find the integer value within.

In practice, this means that an entity suddenly has an infinite number of valid URLs when the menu system attempts to load the referenced entities: node/1 can be accessed at "node/ 1", "node/ 1", node/01, node/001, and so on.

This can have negative implications for SEO if a search engine happens to get wind of an incorrect URL and then considers it to be duplicate content.

However, removing this call to intval still does not resolve the issue, as the underlying DB query will still return an entity id and so a valid entity is loaded for paths that should not be valid.

Comments

MrDaleSmith created an issue. See original summary.

cilefen’s picture

Priority: Major » Normal

This does not meet the criteria for a major bug.

MrDaleSmith’s picture

@cilefen It interferes with the normal usage of a Drupal site, and prevents the Global Redirect contrib module from correctly redirecting node/%nid URLs to their assigned URL alias.