Spider-Man, the iconic comic character who has featured in a series of blockbuster films, must not be portrayed on screen as a homosexual, or as belonging to any race other than white, according to an agreement between Marvel Comics and Sony Pictures, which was revealed in an email released as the result of a cyberattack on the film studio.

Portions of a 2011 licensing agreement between the two companies, published by Gawker, includes a list of “Mandatory Spider-Man character traits,” which requires that the character is male, does not use torture, does not use foul language, does not smoke, abuse alcohol or sell drugs and is not a homosexual.

The document also reveals a list of mandatory character traits for Spider-Man's alter-ego, Peter Parker, and stipulates that he too, must be a Caucasian heterosexual.

Interestingly, however, the document does include the caveat that the stipulation on sexuality only applies as long as Marvel has not portrayed the character as a homosexual in the comic book series.

The revelations come at a time when conventions about characters' race and sexuality in mainstream cinema and comics are increasingly being challenged.

Other information leaked in the Sony Pictures hack revealed that then-studio chairman Amy Pascal wanted black British actor Idris Elba to play James Bond. In addition, the character of Bobby “Iceman” Drake in the X-Men comics recently came out as gay, and rival studio DC Comics also announced that a gay superhero, known as Midnighter, will be getting a solo comic book series.

The casting of actors of one race in roles that were traditionally another has, however, been the subject of some fan backlash. Some commenters suggested that Elba's casting as Bond would detract from the franchise, and the casting of black actor Michael B. Jordan in the upcoming "Fantastic Four" movie was also subject to some racially charged backlash.

Critics have also pointed out that while Marvel's comics are becoming increasingly diverse in terms of the characters' race, gender and sexualities, movies set in the “Marvel universe” have not reflected this change.