I'm using:
mediawiki 1.34
php 7.4
apache 2.4.46
mysql 8.0.22
The problem that I'm having is that I get permissions denied errors from the api when I try to edit, move, or delete pages that have a "/" in its title. This happens through the UI and in some cases things just fail silently and I had to open up the browser's dev tools to look at the network tab.
This has been happening for a while now and we've managed to just not use "/" in any of the page titles, but recently the Translate extension was installed and has been causing issues because translations are stored in pages like title/segment/lang.
Saving a translation POSTs this data:
action=edit&
format=json&
title=Translations%3ATest%2FPage+display+title%2Fes&
text=asdasdsasd&
summary=&
assert=user&
token=XXXX19%2B%5C
and it returns this from api.php:
{
"error":
{
"code":"permissiondenied",
"info":"You are not allowed to execute the action you have requested.",
"*":"See https://localhost/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for notice of API deprecations and breaking changes."
}
}
The user definitely has all of the translation permissions set, this happens even if I set all translate extension permissions to true for "*".
Does anyone possibly know what could be causing these issues? Or if there's some way to debug this to isolate what permission and where it's being checked? It looks like everything else works fine. I don't have very much experience with mediawiki, someone else used to manage it but they've left.
Try adding AllowEncodedSlashes NoDecode to your Apache config, and nocanon to the ProxyPass directive in it.
I am trying to send emails using smtp in an Adobe AIR application, I am unable to make the code work with gmail but it works with my hosted email without TLS/SSL so my assumption is that TLS/SSL is the issue.
I am using SMTPMAiller from http://www.bytearray.org/?p=27
with latest as3cryptolib I can fine.
I do not want to use a server side script.
Please respond only if you have a working code/application that works with gmail in present.
Thank you
Edit: My question is if you have already this working in present what libraries and what versions are you using, I am sure my libraries are too old.
I managed to send emails from gmail.yahoo using SMTP and SSL using this library airxmail
I had a few problems though, I was trying to log the code using event listeners to understand what is going wrong but adding a specific listener caused problems, I reported it here . For logging I suggest using what the author recommends(the mx.Log).
Other issue was caused by the not clear documentation from the first example I found, there was some code that needed to run for SSL only and other code that needed to run for TLS only.
I did not had time or need to test TLS so I am not sure if it works, code is not yet in production so maybe I will find more issues later.
I created a wrapper class, my needs is to have a test function when a user will add his email credentials and settings, then have the ability to send more then one email, I will show my main code here , use at your own risk.
I tried adding my sample here but SO code formatted did not like it, here is a gist I hope it will help.
I'm debugging on my local host but want to change the default API url from https://dev.domainname.com/api/ to https://devtwo.domainname.com/api/. I know there is a way to force it by entering something into the console, but I can't remember what it is. I'd like to have the command for both Firefox and Chrome.
Please forgive my ignorance in using the proper language or explanation...I'm learning!
At the Web console with the page opened (can be the local development server created, or a website Webapp like dev.domainname.com), use next to setup a different REST Service URL:
localStorage["NameApp/config"] = '{"siteUrl":"http://devtwo.domainname.com"}';
To restore it, and left the App/Webapp use the default URL just:
delete localStorage["NameApp/config"]
I have implemented my reCAPTCHA in line with as is shown in the example.
I have this script in the head tag:
<script src="https://www.google.com/recaptcha/api.js"></script>
In my form in HTML I have:
<div class="g-recaptcha" data-sitekey="my public sitekey here"></div>
But when I load the form I get this error:
ERROR: Invalid domain for site key
I have confirmed that this is the correct site key for my domain.
The code is currently in a subdomain so I thought maybe that was the problem so I also added the subdomain to the Google reCAPTCHA admin but still get the error.
The exact same code works 100% in a different domain (with a key specific to that domain).
What could be the problem?
In case someone has a similar issue. My resolution was to delete the key that was not working and got a new key for my domain. And this now works with all my sub-domains as well without having to explicitly specify them in the recaptcha admin area.
First of all, the keys are managed at https://www.google.com/recaptcha/admin#list
I ran into this error because I'm using the same key on a few different domains and I had forgotten to add one of the domains to the key.
After adding my site it took a minute or two (most likely because of cache) for things to work normally again.
I had the same problems I solved it.
I went to https://www.google.com/recaptcha/admin and clicked on the domain and then went to key settings at the bottom.
There I disabled the the option below
Domain Name Validation
Verify the origin of reCAPTCHA solution
clicked on save and captcha started working.
I think this has to do with way the server is setup. I am on a shared hosting and just was transferred without notice from Liquidweb to Deluxehosting(as the former sold their share hosting to the latter) and have been having such problems with many issues.
I think in this case google is checking the server but it is identifying as shared server name and not my domain.
When i uncheck the "verify origin" it starts working.
Hope this helps solve the problem for the time being.
No need to create a new key just clear site data on browser
If you change your site domain then add that domain to existing key (it's not necessary to a create new one) and save it.
https://www.google.com/recaptcha/admin#list
but google recapture has some data on browser. Clear them then it will work with your new domain
I guess the quickest way is just to disable the domain check while you're developing it
I was using localhost during unit testing when my recaptcha key was registered to 127.0.0.1. So I changed my browser to point to 127.0.0.1 and it started working. Although I was able to add "localhost" to the list of domains in my ReCaptcha Key Settings, I am still unable to unit test using localhost. I have to use the loopback IP address 127.0.0.1.
You may have inadvertently used a private key for a public key.
There is another point must be noted before regenerating keys that resolve 90% issue.
for example your xampp directory is C:\xampp
and htdocs folder is C:\xampp\htdocs
we want to open page called: example-cap.html
and page is showing error:
invalid domain for site key
Use your localhost address in browser address like:
localhost/example-cap.html
this will resolve your issue
Do not use address c:\xampp\htdocs\example-cap.html
this will generate error
Make sure you fill in your domain name and it must not end with a path.
example
http://yourdomain.com (good)
http://yourdomain.com/folder (error)
I ran into this issue also and my solution was to verify I was integrating the appropriate client code for the version I had selected.
In my case, I had selected reCAPTCHA v3 but was taking client integration code for v2.
V3 looks like this:
<script src="https://www.google.com/recaptcha/api.js?render=reCAPTCHA_site_key"></script>
<script>
grecaptcha.ready(function() {
grecaptcha.execute('reCAPTCHA_site_key', {action: 'homepage'}).then(function(token) {
...
});
});
</script>
V2 code looks like this:
<html>
<head>
<title>reCAPTCHA demo: Simple page</title>
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
</head>
<body>
<form action="?" method="POST">
<div class="g-recaptcha" data-sitekey="your_site_key"></div>
<br/>
<input type="submit" value="Submit">
</form>
</body>
</html>
As for which version you have, this will be what you decided at the start of your reCAPTCHA account setup.
Try to add domains without http:// and https:// e.g. example.com
For me, I had simply forgotten to enter the actual domain name in the "Key Settings" area where it says Domains (one per line).
I had the same problems. I solved it: I went to https://www.google.com/recaptcha/admin, clicked on the domain and then went to key settings at the bottom.
There I disabled the option below Domain Name Validation Verify the origin of reCAPTCHA solution.
Clicked on save and captcha started working.
You should set your domain for example: www.abi.wapka.mobi, that is if you are using a wapka site.
Note that if you had a domain with wapka it won't work, so compare wapka with your site provider and text it.
I tried for almost 4 Hours with this and finally figuring it out with guidance from here, I thought I would share my solution with you.
Ok so my domain is an addon domain. I also got "ERROR for site owner: Invalid domain for site key" I had checked that everything was correct almost a thousand times and it looked right to me, until I thought of it in terms of a desktop shortcut.
Solution:
So for an addon domain make sure that the parent url is also in the list of domains i.e:
[ADDON DOMAIN].[PARENT DOMAIN].com .
The addon location will be the folder that you set on your host so when using addon domains ensure to name the root with something logical.
Hope this helps someone else and thanks for the suggestions people.
My domain was quite complex. I took the value returned by window.location.host in the developer console and pasted that value in the recaptcha admin white list. Then I cleared the cache and reloaded the page.
I had a similar problem due to the fact that I forgot to show the render parameter
<script src='https://www.google.com/recaptcha/api.js?render=SITE_KEY' async defer></script>
I try to use the perl script to automate the interaction with a website.
I use module WWW::Mechanize to realize my design. But, the website [https] shows session expired.
Can anyone help me with this problem.
First you need to try to login to the same site via browser but with Javascript disabled.
If you'll get same error page this mean that some cookies (or some redirects) are added via Javascript so you need to add these cookies manually from your code.
Any way i recommend you to install HttpFox for Mozilla Firefox and record you login session after that you can find what's wrong with the target site.
Did you
my $browser = new WWW::Mechanize;
$browser->cookie_jar({});
?