Jump to content

security


Apo

Recommended Posts

For example, you change the password for the forum when you're writing new code , the dots or star was to show

And those around you are able to see the code written on the page are not displayed

when i am type the changepass my pass msked

I would not even be able to see new password

function ChangePlayerPassword(player, command, oldpass, newpass) 
    -- get the account the player is currently logged into 
    local account = getPlayerAccount(player) 
    if (account) then 
        -- if its only a guest account, do not allow the password to be changed 
        if (isGuestAccount(account)) then 
            outputChatBox("You must be logged into an account to change your password.", player)  
            -- end the function 
            return 
        end 
  
        -- check that the old password is correct 
        local password_check = getAccount(getAccountName(account), oldpass) 
        if (password_check) then 
            -- check the length of the new password 
            if (string.len(newpass)>=5) then 
                setAccountPassword(account,newpass) 
            else 
                outputChatBox("Your new password must be at least 5 characters long.", player) 
            end 
        else 
            outputChatBox("Old password invalid.", player) 
        end 
    end 
end 
addCommandHandler("changepass", ChangePlayerPassword) 

Edited by Guest
Link to comment
Oh you mean people around you in real life. Well that's another case. You we are not responsible for that, you can hide your keyboard and then type. :P (That's what most people do)

hide your keyboard and write while your friends see the password at the screen :lol::lol:

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...