mardi 19 septembre 2023

Getting ModSecurity: Access denied with code 44 on Laravel Form Submit

I am trying to submit a form in Laravel but getting this error:

ModSecurity: Access denied with code 44 (phase 2). Match of "eq 0" against "MULTIPART_STRICT_ERROR" required. [file "/etc/httpd/conf.d/mod_security.conf"] [line "31"] [id "200002"] [msg "Multipart request body failed strict validation: PE 0, BQ 0, BW 0, DB 0, DA 0, HF 0, LF 0, SM 0, IQ 1, IP 0, IH 0, FL 0"]

No file upload nothing, it's just simple form submit.

I tried without special chars in form data but still getting this error.

Any suggestions?

I tried submitting data w/o special chars I tried (earlier) uploading a file w/o special chars in the file name



via Chebli Mohamed

mercredi 13 septembre 2023

"Your requirements could not be resolved to an installable set of packages"

I'm attempting to run an existing Laravel project that I downloaded from GitHub. When I type 'composer update,' I encounter the following error (please refer to the attached image).

Could the reason behind this error be that my PHP version doesn't match the version specified in the project I downloaded?

error massage

Explain this to me



via Chebli Mohamed

Metamask Dapp Browser Not Redirecting from HTTP to HTTPS on Certain Mobile Phones

I'm developing a web-based decentralized application (Dapp) that interacts with Ethereum using Metamask. I've noticed an issue with the Metamask Dapp browser on some mobile phones. When users type a URL with the http protocol instead of https, the Dapp browser does not automatically redirect to the secure https version of the website.

On most mobile phones, this redirection works as expected, but on a subset of devices, it doesn't. This behavior is causing a security concern as the application relies on HTTPS to ensure the confidentiality and integrity of data.

Here are some details:

  • The web server is properly configured to handle both HTTP and HTTPS requests.
  • The APP_URL in my Laravel application is set to use https in the .env file.
  • The Metamask extension is up to date on all devices.

I'd like to understand why this issue is occurring and if there are any specific settings or configurations I need to adjust to ensure that the Metamask Dapp browser consistently redirects from HTTP to HTTPS on all mobile devices.

Has anyone encountered a similar issue with Metamask on mobile phones, and if so, how did you resolve it? Any insights or guidance on this matter would be greatly appreciated.



via Chebli Mohamed

lundi 11 septembre 2023

laravel-permission Is there a binding relationship between permissions and routes when the user middleware determines permissions?

For example, in the following figure: permission:member_info|member_add is added to the member routing group. If a user has one of these two permissions, the entire member routing can be accessed. Do we have to write them down on specific routes one by one? That's a lot. It doesn't feel that way. If it is not written in the specific route, how should this permission and route be bound? enter image description here

I don't know what to do at the moment, but I feel that it is unscientific to write on the route one by one.

Like the previous comparison url, the permission is the url, which is checked from the data table and compared with the current request url



via Chebli Mohamed

lundi 4 septembre 2023

Xlsx file not able to read data in laravel 5.2

I am using laravel 5.2 and "maatwebsite/excel": "~2.1.0", I am not able to read xlsx file data i am getting response empty data My code is here

Excel::load($filePathNew, function($reader) {
$results = $reader-\>get();
$results = $reader-\>all();
dd($results);
});


via Chebli Mohamed

vendredi 1 septembre 2023

Seeking Guidance for Migrating Laravel 5.4 Web App to a New Domain [closed]

I'm in need of your valuable advice.

We are currently working on a Laravel project, and our Laravel web app is connected to a mobile app via an API. Now, we're planning to move the web app to a new domain. However, there's a catch - our Laravel version is a very outdated 5.4 version, and unfortunately, we've lost access to the source code. Luckily, we do have a server backup file.

Could anyone kindly suggest a method for deploying this code on the new domain?

Thank you in advance.

Laravel 5.4 Web App Migration Help Required.



via Chebli Mohamed

Authentification failed [closed]

I develop in Laravel and I need to do authentication with two roles but it does not work : if the role of the user is a technician or engineer the system must go to the homet.blade.php page ,

here the code is what the syntax is just :

@if (Auth::user()->role == "Technician" xor Auth::user()->role == "Engineer" )

window.location = "/homet";

@endif

I tried to insert the logical operation "xor" but it does not work



via Chebli Mohamed