website in SSL mode not working in firefox - apache

After https migration of my website, the website works well on chrome, internet explorer and safari but not the case for firefox.
The Html pages do not download all resources (css, js and images ...) I have 501 response
See firefox developper tools screenshot here
I have also in the apache log file an errors like:
[error] [client 88.219.231.11] Invalid method in request \x9dGET /medias/new-search.png HTTP/1.1, referer: https://www.
any idea please ?
I do not see where the HEX character \x9d comes from before the GET method?
And why I have this problem only with firefox?
NB: When I ask the html page several times the number of 501 error message in the development panel decreases

I find the issue and i fixed it.
It come from wamp resources.(openSSL)
to fix it:
- I download the openSSL v1.1.0 from this link
- Install it
- In the installed directory, copy the files (bin\openssl.cfg, bin\libeay32.dll bin\ssleay32.dll) and paste it into bin/apacheVersion/bin/ (to remplace the old files)
- rename the copied file openssl.cfg to openssl.cnf
- Restart wamp

Related

Mamp Pro renders without styles in Firefox but correctly in other browsers

for years I've used Mamp (free), but now I pretend to buy pro version, so I've recently installed demo of Mamp Pro and made a few sites work, however, there is one Drupal 9 site that works fine in most browsers, except in Firefox. It renders a non-styled page. It was fine when I used Mamp (free).
What I have tried is to inspect page source of Firefox and compared it to the page source of Chrome, the result of this was that the HTML code is the same in both, and that there are not bad closed HTML tags.
Any idea of what is happening?
Mamp Pro 6.6.4.
Drupal 9.4.9
Firefox 108.0.1 (64-bit)
PHP max_execution_time = 30
PHP memory_limit = -1
PHP max_input_time = -1
Mamp settings
Apache
Firefox screenshot
I don't believe this is related to your MAMP version but to the site not being able to load all CSS/JS files
If you inspect the the page, and go to the 'network' tab, you will see if the CSS & JS files were loaded or not found.
If the case is that there were not found, try this:
a) access the Drupal's "Performance" page:
/admin/config/development/performance
b) Under 'Bandwidth Optimization' deselect:
aggregate CSS files
aggregate JS files
'Save Configuration'
c) clear cache
You may then select to aggregate the files back
===

SSL setup configuration in symfony 1.4

I have a site with symfony 1.4, and installed the SSL certificate in the server, the home page works but when I click in any link I get an error 404. But if I use the Dev mode from symfony I am able to navigate through all the website... weird to me.
I tried to install the plugin sfSslRequirementPlugin - 2.0.0, when I enable it I get this error when loading the page: net::ERR_TOO_MANY_REDIRECTS for any page.
Any idea??
Yes, this is because of some code defects in .htaccess file. Can you please send me .htaccess file so that we can investigate more on this issue.
The error net::ERR_TOO_MANY_REDIRECTS is because of .htacess as it is redirecting the page. I had faced the same issue once.

understanding and/or troubleshooting XMLHttpRequest - No 'Access-Control-Allow-Origin' error

I am not an experienced web developer by any means, so I apologize if this is very basic / newb question. I did try researching this error message, but my skillset lies in different areas, so I was hoping someone could maybe give me a pointer.
We have a SWG (secure web gateway) inline that may or may not be causing this, since access works in IE, but not in Chrome - and the SWG just went inline recently - so am trying to find some root cause for this error.
here is the error message that I pull out of Chrome's Console debugger:
XMLHttpRequest cannot load .... No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://www.youtube.com' is therefore not allowed access. The response had HTTP status code 403.
the "..." shows a URL that referes to a googlevideo.com link, but I am trying to view a video on youtube.com - any video for that matter.
seems that this is an XSS defense mechanism, but I dont see any blocks in the SWG, nor are some of the next-gen features even enabled
Chrome version - Version 51.0.2704.63 m (64-bit)
IE version - 11.0.9600.18314
any help is appreciated.
--disable-web-security now requires the use of the --user-data-dir flag.
Start-up your chrome with below command on windows:
chrome.exe --disable-web-security --user-data-dir
OR
Open Properties window of Google Chrome short cut icon available on desktop.
Go to the Shortcut tab
Specify the following flag at the end of path
"C:...\Application\chrome.exe" --disable-web-security --user-data-dir
Just specifying --disable-web-security --user-data-dir (without a value) worked for me.
If this didn't work for you then try specifying some folder path:
--user-data-dir=$HOME/path/to/some/folder

Why Firefox 33 shows "is not fully secured" on the first load?

I am trying to setup my HTTPs website with Apache 2.2 and Firefox 33.
On the first load Firefox shows that warning.
But on the next page load (i.e. F5, another tab, etc until firefox restarts) everything on this URL is secure.
The page is just plain HTML, no javascripts, no images. I put robots.txt and favicon.ico into the /var/www/site/htdocs/ (I thought firefox loads them from http:// instead of https://). But this did not helped.
So, why firefox shows this warning on the first view after launch and don't does that later?
(I tried to ask this question on server fault, but don't have enough reputation to upload pictures)
UPD: Tools -> Web Development -> WebConsole says
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://mc.yandex.ru/webvisor/26570853?rn=493111185&page-url=http%3A%2F%2Fstart.calculate-linux.ru%2F&wmode=0&wv-type=0&wv-hit=372504783&wv-part=1&wv-check=34794&browser-info=z%3A240%3Ai%3A20141022210348%3Arqnl%3A1%3Ast%3A1413997437. This can be fixed by moving the resource to the same domain or enabling CORS. 26570853
Everything becomes ok, when I set about:blank as homepage.
But the question remains - how (in this scenario) scripts from previous page can affect next page?

WebRTC - Browser doesn't ask for mic access permission for local html file

I have some simple webRTC code which uses getUserMedia to gain access to user's mic. Now when I load that html file (saved at my localhost) in my browser, the browser doesn't ask for mic access permission and thus get failed to get access.
But when I run the same html inside the w3schools.com editor, it asks for mic access permission and upon allowing it to access my mic, it works fine...
Why is this strange behaviour?
When you open an html file right off the filesystem (file:// prefix), Chrome will auto-block getUserMedia permissions. You have to run a server locally.
I started up a sinatra server like this:
# server.rb
require 'sinatra'
get '/' do
File.read('index.html')
end
Then give it ago.
$ gem install sinatra
$ ruby server.rb
http://localhost:4567
Because of security Chrome won't open user media, e.g. WebCam when executing a file:/* document.
You could override however the security policy by starting chrome with the --disable-web-security command line option.
For testing check also the --use-fake-device-for-media-stream option.
N.B. When specifying command line options make sure there is no chrome/chromium process running.
P.S Give it a try by creating a file test.html containing
<!DOCTYPE HTML>
<video autoplay/>
<script>
navigator.webkitGetUserMedia({audio:true,video:true},
function(stream){
document.querySelector('video').src =
URL.createObjectURL(stream);
});
</script>
and than kill all chrome instances and start chrome like this:
chrome.exe --use-fake-device-for-media-stream --disable-web-security test.html
This behavior is caused by Chrome security settings.
If you have PHP installed and you don't wanna setup Apache or other more advanced web server, probably the easiest way would be to run internal PHP web server this way (assuming you have your web files in /home/user/web/):
php -S 127.0.0.1:3000 -t /home/user/web/
Here is a description of the parameters:
-S <addr>:<port> Run with built-in web server.
-t <docroot> Specify document root <docroot> for built-in web server.
After you run the server start your browser and open this URL (assuming your test file is called webrtc.html):
http://127.0.0.1:3000/webrtc.html
Just some troubleshooting suggestions:
Check chrome://settings/content (scroll down to "Media"), to see if you've accidentally selected that site to always allow or always deny. (I'm on Chrome 26[dev]; this may be located somewhere else on Chrome 24.)
Also try restarting your browser - this bit of Chrome is still pretty buggy in my experience, and sometimes a restart fixes it.
And make sure you've got an error handler in your getUserMedia() call - there may be some additional info there.
Are you loading the file via something like file://? It seems chromium does not give access to those files at all and completely ignores the request. Just tried myself and after uploading the file to a dev server it worked fine.
Even setting it to allow always it still does not work with file://.
You can't run HTML5 that uses getUsermedia API locally without using a local server. Use WampServer and place your HTML5 file inside the www folder.
This answer is for chrome
In Chrome you can use the --allow-file-access-from-files flag to allow webcam access from a local file.
Mac
On a mac you can open the terminal and type:
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --allow-file-access-from-files /path/to/file.html
change /path/to/file.html with your path
Windows
In Windows you can create a shortcut. Right click Google Chrome And in the menu select: Copy To -> Desktop (shortcut), then right click the shortcut and click properties add the flag:
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --allow-file-access-from-files C:\path\to\file.html
Hope this answer helps!