text
stringlengths
1
330k
Eating halal food. Every time you put halal food in your mouth it is sadaqah - you are refraining from eating haram. That is why you will be compensated for it.
Doing something for your parents. Even it is something casual like dropping them somewhere , getting something that they asked for, or simply serving them food. Since a refusal to do something for them will be noted as a sin - simply by doing something - it is written down as a good deed.
Taking care of your employees. They are working for you. Make sure they are not over burdened. Do not be rude to them - race/age/ money - is no excuse for treating someone rudely. Be careful with you manners. Surely we all will be brought to account. As for the employees who work in your homes. Feed them the food that ...
Listen to Islamic lectures and gaining knowledge of and about Islam. Our knowledge will lead to us becoming better Muslims insh'Allah. Keep reminding yourself of your duties as Muslims - to children, parents- siblings - the people around you.
May Allah guide us all.
Start by doing a small good deed now. Maybe the article that you weren't getting time to read. The friend who needed you but you never got around to asking. The relative that you haven't met in a long time because of some dispute you had. Cleanse your heart against someone you had an argument with. Be careful the next ...
Tuesday, December 11, 2007
Zill hajj.How to make the most of it!
I was going to write a post on the benefits of doing ibadah and how to make the most of these precious days of Zill hajj when every single good deed weighs so much more. Alhamdullilah, a sister fowarded me this article which i have copy/pasted. May Allah guide our ummah to the right path and prevent us from going astra...
The BEST days are here once again alhumdulillaah! We already know the significance of the 10 day of Dhul Hijjah… We know that good deeds during these days are the MOST beloved to Allaah. BUUUTTT… we sit back and watch these 10 Exceptional days fly by every year without making the most out of it. WHY? Most of the time i...
Here's a list of easy good deeds to spice up these days and earn UNBELIEVABLE rewards on our scales. Most of the list is taken from Muhammad Al-Shareef's article- '50 things to do in Hajj' (with slight modifications applicable to those of us staying back) Use this list, and enjoy the pleasure of crossing out each deed ...
[1] Smile in another Muslims face
[2] Say Salam to strangers
[2.5] Say salaam to your family and those who you meet everyday - not Good morning or good evening.
[3] Shake someone's hand and ask about their health
[4] Shun vain talk
[5] Recite Takbeer ("Allaahu akbar"), Tahmeed ("Al-hamdu Lillaah"), Tahleel ("La ilaha ill-Allaah") and Tasbeeh ("Subhaan Allaah") everywhere you go and encourage others
[6] Lower your gaze
[7] Read Qur'an with the Tafseer
[8] Do the authentic Dhikr of the morning and evening
[9] Visit/ Phone relatives on Eid day
[10] Make dua for forgotten friends (and the author of this list)
[11] Say the dua of entering the market place when you go there
[12] Forgive people that wrong you
[13] Compliment someone sincerely
[14] Visit the hospital and thank Allah for all that He has given you
[15] (For men) On the days of Eid, offer perfume to those around you
[16] Remember specific blessings Allah has bestowed upon you and say Alhamdulillah
[17] Pray to Allah using His most beautiful names (al Asmaa' al Husna)
[18] Use a Miswak
[19] Memorize two ayahs of the Qur'an daily
[20] Visit your Non-Muslim neighbors and gift them Eid baskets (With a special note about the significance of this special occasion)
[21] Don't forget to visit your Muslim neighbors as well
[22] Make small/attractive cards about the importance of the 10 days of Dhul Hijja and hand it out at jumuah prayers (or any prayer!) Sisters- Give the cards out to the Muslims you meet during these days
[23] (For men) Pray in the masjid
[24] Buy gifts for Mom, Dad and family
[25] Call up someone who haven't spoken for AGES (But no gossiping!)
[26] Give charity every day - even 1 buck at the mall or supermarket or anywhere is good.
[27] Invite you non Muslim friend for lunch/dinner and tell her/him about Islam
[28] Switch OFF the TV (Turn ON your life!)
[29] Take out your long list of duas and beg Allaah to have ALL your desires fulfilled If you don't have a Dua list, MAKE ONE! (Advice of a sweet sister)
[30] Fast (Especially on 9th Dhul Hijjah) - for those in dxb, 9th dhul hijjah is on Friday, 3oth Dec
[31] Set your alarm ring earlier then Fajr and do qiyam! Trust me, you'll love it!
[32] Pray for our Ummah, Pray for the families sufferreing in iraq, afghanistan,chechnya. the prisoners that are being held without trial.
[33] Always intend reward from Allah for everything you do
[34] Forward this list to EVERY Muslim you know!
35. For those in dxb, try listening to 88.2 in your car, thats the Quran channel 36. Say dua for our Prophet Sallallahu alaihiwasalam
37. Every thing that you do, do it for Allah's pleasure. For instance, sit and drink water, simply because it is sunnah that way.
38. Before going to bed say Ayatul kursi and the three Quls (qul hua allahu ahd, qul aauzu bi rabbi naas, qul aauzu bi rabbi'l falaq)
39. Teach a child a simple dua to say during his prayers. Whenever the child says the dua, you also will get the benefit.
40.Visit the sick or those who are lonely or don't have much company (eg. granparents or single granparent)
41.Offer two rakahs Salat ud-Duha…this is equal to offering charity for the 360 joints of the body.
42.Say loads of 'Astagfaar' (asking forgiveness)
43.Can even perform two rakahs for astagfaar.
44.Controlling the tongue ...and also avoiding fights
45.Good treatment towards parents (mostly taken for granted), relatives, neighbours, siblings (especially the younger ones who are mostly bossed)
46.Peace making – between 2 friends or relatives who may not be on good terms with each other
47.Remove harmful things from the way
48.Condolence and consoling…Making someone's day....some friend or relative maybe going through a diffcult time and many times we dont realize it.
.Meet for Allah...attend religious gatherings. Prophet Muhammad s.a.w.s. said: "When you pass by the gardens of Paradise, avail yourselves of them." The companions asked what are the gardens of Paradise, O Messenger of Allah? He replied: "The circles of zikr. There are roaming angels of Allah who go about looking for t...
49.Help an orphan/widow - Prophet Muhammad (peace be upon him) said: "Whoever strokes the head of an orphan, not stroking it for any other reason except to seek the pleasure of God, will be rewarded for every hair that his hand touches." He also said:"Whoever treats an orphan girl or boy well, I will be with him on the...
50.Kushoo in salaah -
51.Get rid of a bad habit (eg. being on time, more organized...and im sure there are many other habits we can fix )
[More suggestions are welcome]
note: salutul duha : The time for duha begins when the sun is about a spear's length above the horizon [so about 15 minutes or so after sunrise time on the timetable] and it continues until the sun reaches its meridian. It is preferred to delay it until the sun has risen high and the day has become hot.It can be prayed
as two or more rakah.
Take the 2-minute tour ×
I have gone through the OWASP top ten vulnerabilities and found that Cross-Site Scripting is the one we have to take notes. There was few way recommended solutions. One has stated that Do not use "blacklist" validation to detect XSS in input or to encode output. Searching for and replacing just a few characters (< and ...
share|improve this question
closed as primarily opinion-based by bummi, rene, Alex K, greg-449, Jim Garrison Jan 7 at 8:43
Possible duplicate: stackoverflow.com/questions/24723/… –  aem Jul 21 '09 at 15:10
3 Answers 3
The normal practice is to HTML-escape any user-controlled data during redisplaying in JSP, not during processing the submitted data in servlet nor during storing in DB. In JSP you can use the JSTL (to install it, just drop jstl-1.2.jar in /WEB-INF/lib) <c:out> tag or fn:escapeXml function for this. E.g.
<p>Welcome <c:out value="${user.name}" /></p>
<input name="username" value="${fn:escapeXml(param.username)}">
That's it. No need for a blacklist. Note that user-controlled data covers everything which comes in by a HTTP request: the request parameters, body and headers(!!).
If you HTML-escape it during processing the submitted data and/or storing in DB as well, then it's all spread over the business code and/or in the database. That's only maintenance trouble and you will risk double-escapes or more when you do it at different places (e.g. & would become &amp;amp; instead of &amp; so that...
See also:
share|improve this answer
+1 ! If only we could somehow configure the EL expression to default to html-escaping, then we wouldnt need to have lots of c:out everywhere :-) –  bertie Jul 3 '12 at 4:20
Ah, you have answered about this issue in here : stackoverflow.com/questions/5887037/… –  bertie Jul 3 '12 at 4:22
@Albert: if I'm not mistaken, you're already using JSF/Facelets, right? All XSS escaping is already done for you then, yes. –  BalusC Jul 3 '12 at 4:26
Wow, you still remember ! Yes i was with Facelets, but currently on a project using SpringMVC, and with JSP as the view. So my current conclusion is to c:out when displaying user inputs, and EL for the rests. –  bertie Jul 3 '12 at 7:33
What if there is something in the output value like, <font color="#FF0000"> it would display as it is without taking effect. –  Narayana N Oct 4 '12 at 14:59
Use both. In fact refer a guide like the OWASP XSS Prevention cheat sheet, on the possible cases for usage of output encoding and input validation.
Input validation helps when you cannot rely on output encoding in certain cases. For instance, you're better off validating inputs appearing in URLs rather than encoding the URLs themselves (Apache will not serve a URL that is url-encoded). Or for that matter, validate inputs that appear in JavaScript expressions.
Ultimately, a simple thumb rule will help - if you do not trust user input enough or if you suspect that certain sources can result in XSS attacks despite output encoding, validate it against a whitelist.
Do take a look at the OWASP ESAPI source code on how the output encoders and input validators are written in a security library.
share|improve this answer
My preference is to encode all non-alphaumeric characters as HTML numeric character entities. Since almost, if not all attacks require non-alphuneric characters (like <, ", etc) this should eliminate a large chunk of dangerous output.
Format is &#N;, where N is the numeric value of the character (you can just cast the character to an int and concatenate with a string to get a decimal value). For example:
// java-ish pseudocode
StringBuffer safestrbuf = new StringBuffer(string.length()*4);
foreach(char c : string.split() ){
if( Character.isAlphaNumeric(c) ) safestrbuf.append(c);
else safestrbuf.append(""+(int)symbol);
You will also need to be sure that you are encoding immediately before outputting to the browser, to avoid double-encoding, or encoding for HTML but sending to a different location.
share|improve this answer
Space isn't alphanumeric, right? –  Tom Hawtin - tackline Jul 21 '09 at 23:28
Correct. Space is not alphanumeric, and, given this very draconian algorithm, will encode to &#32; . This may seem like it's never necessary, but think of a case where only known dangerous characters of single & double quote are handled, if the output is constructed from the following JSP snippet: <input name=foo value...