Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!


Forgot your password?

Comment Re:Except (Score 1) 249

Still, it is a single query. Example, see " // ONLY ONE QUERY!!!!" below:

public User login(String userName, String passwd)
                        throws LoginException {
                if (userName != null) {
                        userName = userName.trim();
                if (userName == null || passwd == null || userName.length() 1
                                || passwd.length() 4) {
                        throw new LoginException("No such user/passwd found");

                Session hsession = HibernateUtil.currentSession();
                Query query = hsession.createQuery("from User where userName=:userName");
                query.setString("userName", userName);
                User user = (User) query.uniqueResult(); // ONLY ONE QUERY!!!!
                if (user == null) {
                        throw new LoginException("No such user/passwd found");
                passwd = HashUtil.get(user.getSalt(), passwd);
                long userStatus = UserConstants.USER_STATUS_WAITING_FOR_EMAIL_CONFIRM
                                + UserConstants.USER_STATUS_WAITING_FOR_PASSWORD_RESET
                                + UserConstants.USER_STATUS_DISABLED
                                + UserConstants.USER_STATUS_QUARANTINE;
                if (user.getPassword() == null || !user.getPassword().equals(passwd)
                                || (user.getStatus() & userStatus) != 0) {
                        throw new LoginException("No such user/passwd found");
                } else {
                        user.setLastLoginDate(new Date());
                        return user;

Comment Re:A lack of imagination? (Score 2) 285

The radiation problem is not related to zero-G. No amount of gravity, simulated or otherwise, is going to solve that.

Are you sure about that? Gravity from a black hole will eat any radiation. So, problem solved! Just carry a black hole with the ship...

Comment Re:The fact that Zero Days in the Home are a thing (Score 1) 39

No, no, it is a very good technology when you know what you are doing. Contact me offline for further requests,
I run an hyper-Z omega secretive cloud that will take care of all your security needs, 100% hacker proof, guaranteed! We are also fully compatible with all the Apple apps!

Comment Re:Reported in October (Score 1) 39

Apple have never really taken security seriously...

I am not trying to defend apple here since there is no excuse but seriously, very few people take security seriously nowadays even where one would expect people in charge of a given organization to do so.

I remember a default value for an organization field being "not_organized" somewhere, I think it was in certificate requests but I am not sure ;-)

In a technologically advanced society, maybe IT security topic knowledge should be made mandatory before going to high school.

Slashdot Top Deals

"The way of the world is to praise dead saints and prosecute live ones." -- Nathaniel Howe