verification

Regex email verification error - using JavaScript

99封情书 提交于 2019-12-06 15:59:55
问题 //if HTML5 input email input is not supported if(type == 'email'){ if(!Modernizr.inputtypes.email){ var emailRegEx = /^([a-zA-Z0-9_\.\-])+\@([a-zA-Z0-9\-])+\.+([a-zA-Z0-9]{2,4})+$/; if( !emailRegEx.test(value) ){ this.focus(); formok = false; errors.push(errorMessages.email + nameUC); return false; } } } This is my javascript regex for checking if e-mail format is correct. But When I try it myself it shows no error for any ..@.. It does not check .com or whatever in the end. What am I doing

Security vulnerabilities with file_get_contents() using variable location

我与影子孤独终老i 提交于 2019-12-06 14:11:55
Part of my site's application process is that a user must prove ownership of a website. I quickly threw together some code but until now didn't realize that there could be some vulnerabilities with it. Something like this: $generatedCode="9s8dfOJDFOIesdsa"; $url="http://anyDomainGivenByUser.com/verification.txt"; if(file_get_contents($url)==$generatedCode){ //verification complete! } Is there any threat to having a user-provided url for file_get_contents()? Edit: The code above is just an example. The generatedCode is obviously a bit more elaborate but still just a string. Yes, this could

Verify reCaptcha V2 : Always false

非 Y 不嫁゛ 提交于 2019-12-06 12:15:00
问题 I'm trying to implant reCaptcha V2 of Google in my website (developed in PHP & Wordpress). I'm trying to verify if the user has checked this Captcha before the submit. And here is my verification : <?php if(isset($_POST['g-recaptcha-response']) && !empty($_POST['g-recaptcha-response'])){ $privatekey = $secret; $captcha = $_POST['g-recaptcha-response']; $url = 'https://www.google.com/recaptcha/api/siteverify'; $data = array( 'secret' => $privatekey, 'response' => $captcha, 'remoteip' => $

How to verify sender of incoming email address in Google App Engine?

倾然丶 夕夏残阳落幕 提交于 2019-12-05 19:13:11
I'm trying to write a heavily email-based application in the Python SDK of Google App Engine. I've noticed that Google allows you to receive email via its API , and that it easily gives you access to the standard fields like From, To, Body, etc. However, if I'm trying to verify that an email address came from who it said it came from (kind of in the way that Posterous does it for you), how can I? I don't have access to any of the email headers, so I can't check the MX record of the sending server's IP address or anything fancy like that. Any ideas? Actually, while not well documented, the

Google App Engine on Google Apps Domain

…衆ロ難τιáo~ 提交于 2019-12-05 19:01:45
问题 I'm having trouble getting my domain pointed to my website hosted with google app engine. Here's the background... take care to separate the concepts of "google apps" (domain hosting, email, etc.) and "google app engine" (website framework). I have a domain that's using Google Apps for Your Domain, let's call it company.com. So my login for my google apps account is bob@company.com. I have a different domain that is aliased back to my google apps account, let's call it mycompany.com. It's

Mobile Number verification for dual SIM devices in Android

走远了吗. 提交于 2019-12-05 18:16:28
I have done the sim/mobile number verification (same like Whats APP) part in my app. something like: Send Message Part: SmsManager sm = SmsManager.getDefault(); sm.sendTextMessage(mobileNumber, null, "Welcome", null, null); Check the message received by the same/current device through BroadcastReceiver: private class SMSReceiver extends BroadcastReceiver{ @Override public void onReceive(Context context, Intent intent) { if(intent.getAction() != null && intent.getAction().equals("android.provider.Telephony.SMS_RECEIVED")){ Bundle extras = intent.getExtras(); if (extras == null){ _submit.setText

SMT solver with custom theories?

心不动则不痛 提交于 2019-12-05 17:48:57
I'm looking at doing some verification work where I've got regular tree grammars as an underlying theory. Z3 lets you define your own stuff with uninterpreted functions, but that doesn't tend to work well any time your decision procedures are recursive. They used to allow for plugins but that has been depricated, I think. I'm wondering, does anybody have a recommendation of a decent SMT solver that allows you to write decision procedures for custom theories? There are several options given that most reasonable SMT solvers are open source you can integrate theory solvers in any detail depending

Change username Github “You must verify your email address” 403 error on git push

心不动则不痛 提交于 2019-12-05 13:15:32
I recently changed my username on github (so that everything redirects to a new URL on my username) I got this error through a cmd line git push You must verify your email address Fatal: The request URL returned error: 403 However, github wouldn't let me resend email verification under account > settings I also did the following, per githubs guidelines on username change git remote set-url origin https://github.com/myNewUserName/repo-name on all my new repos. Then I ensured I had the emails set correctly on my .git/config file git config --global user.email "myGithubEmail@gmail.com" Still

Is using 2 different hash functions a good way to check for file integrity?

≯℡__Kan透↙ 提交于 2019-12-05 11:24:11
I have a website where users can upload their files; these are stored on the server and their metadata recorded in a database. I'm implementing some simple integrity checks, i.e. "is the content of this file now byte-for-byte identical as when it was uploaded?" An example: for content of userfile.jpg , MD5 hash is 39f9031a154dc7ba105eb4f76f1a0fd4 and SHA-1 hash is 878d8d667721e356bf6646bd2ec21fff50cdd4a9 . If this file's content changes, but has the same MD5 hash before and after, is it probable that the SHA-1 hash will also stay the same? (With hashing, sometimes you can get a hash collision

What's the difference between data Validation and Verification? [closed]

眉间皱痕 提交于 2019-12-05 08:38:09
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . My recollection from a past employer is that they distinguished between the two as follows: Validation is the process of checking that the data is appropriate in a very basic sense; for example that data in a date field can be converted