There is a clear injuction on how one should conduct in war..
And fight in the way of Allah with those who fight with you and do not exceed the limits. Verily, Allah loves not those who exceed the limit. (190) And kill them wherever you find them and drive them out from whence they drove you out; and mischief (disbelief) is more grievous than slaughter; and do not fight with them at the Sacred Mosque until they fight with you therein; but if they do fight you than slay them; such is the recompense of the unbelievers. (191) But if they desist, then verily Allah is forgiving, Merciful. (192) And fight with them until there is no (more) mischief (disbelief), and religion be only for Allah; but if they desist then there should be no hostility except against the oppressors. (193) The sacred month for the sacred month and reprisal (is lawful) in all sacred things; whoever then acts aggressively against you, inflict the like aggression on him as he has inflicted on you; and fear Allah and know that Allah is with those who guard (against evil). (194) And spend in the way of Allah and cast not yourselves into perdition with your own hands; and do good; verily Allah loves those who do good
The above is the full verse, which people quote only the verses in the middle.Now read this and check whether this law is fair enough..