מעכשיו פוסטים חדשים מ-Usenet לא יופיעו ואי אפשר להירשם לתוכן מ-Usenet בקבוצות Google. התוכן שכבר פורסם עדיין יופיע.

laravel validation

10 צפיות
מעבר להודעה הראשונה שלא נקראה

Jan Novak

לא נקראה,
29 בדצמ׳ 2016, 11:55:2829.12.2016
עד
Hi,

i search for a laraval validation rule for directory pathes.
I want to know if the path exists and is writable, what was entered in a
form and will evaluated in the contoller.

At the moment i have only

$this->validate($request,
['path'=>'required|unique:archive,path,'.$request->id,'id']);

for validation (path is required and must be unique)
But how to include the rule for is_directory and is_writable ?

Jan

Jerry Stuckle

לא נקראה,
29 בדצמ׳ 2016, 13:19:2529.12.2016
עד
Jan,

I don't use laravel (I'm not sure if anyone here does). But what
exactly is it you are trying to do?

It looks like possibly you are allowing someone to upload a file to a
directory they specify on your site. If so, be aware this is extremely
dangerous. They could easily upload malicious code, such as a script
that downloads a virus or code that dumps your entire website (including
passwords, etc.) to them.

If this isn't the case, can you please explain what you're trying to
accomplish? Perhaps there is an easier way to do what you want.

I also see they have a pretty active forum at www.laracasts.com/discuss.
You might try asking there.

--
==================
Remove the "x" from my email address
Jerry Stuckle
jstu...@attglobal.net
==================

Jan Novak

לא נקראה,
30 בדצמ׳ 2016, 2:59:0130.12.2016
עד
Am 29.12.2016 um 19:19 schrieb Jerry Stuckle:

>> i search for a laraval validation rule for directory pathes.
>> I want to know if the path exists and is writable, what was entered in a
>> form and will evaluated in the contoller.
>>
>> At the moment i have only
>>
>> $this->validate($request,
>> ['path'=>'required|unique:archive,path,'.$request->id,'id']);
>>
>> for validation (path is required and must be unique)
>> But how to include the rule for is_directory and is_writable ?
>>
> directory they specify on your site. If so, be aware this is extremely
> dangerous.

I know, but it is an intranet application (DMS).

> If this isn't the case, can you please explain what you're trying to
> accomplish? Perhaps there is an easier way to do what you want.

It is an laravel question, because of this spcial "validators" inside
laravel.
I have already try the laravel forum, but until now, i havent got an
answer. Maybe i try it again.

thx.

Jan

Jerry Stuckle

לא נקראה,
30 בדצמ׳ 2016, 8:56:2030.12.2016
עד
On 12/30/2016 2:58 AM, Jan Novak wrote:
> Am 29.12.2016 um 19:19 schrieb Jerry Stuckle:
>
>>> i search for a laraval validation rule for directory pathes.
>>> I want to know if the path exists and is writable, what was entered in a
>>> form and will evaluated in the contoller.
>>>
>>> At the moment i have only
>>>
>>> $this->validate($request,
>>> ['path'=>'required|unique:archive,path,'.$request->id,'id']);
>>>
>>> for validation (path is required and must be unique)
>>> But how to include the rule for is_directory and is_writable ?
>>>
>> directory they specify on your site. If so, be aware this is extremely
>> dangerous.
>
> I know, but it is an intranet application (DMS).
>

Even more dangerous. More successful hacks occur from internal sources
than external. People thing that just because something is intranet it
is safe. That is far from reality.

>> If this isn't the case, can you please explain what you're trying to
>> accomplish? Perhaps there is an easier way to do what you want.
>
> It is an laravel question, because of this spcial "validators" inside
> laravel.
> I have already try the laravel forum, but until now, i havent got an
> answer. Maybe i try it again.
>
> thx.
>
> Jan
>

Right, but that's why I was asking what you are trying to do. Perhaps
we can find a different way of doing it.

Jan Novak

לא נקראה,
30 בדצמ׳ 2016, 10:03:3230.12.2016
עד
Am 30.12.2016 um 14:56 schrieb Jerry Stuckle:
>>> directory they specify on your site. If so, be aware this is extremely
>>> dangerous.
>>
>> I know, but it is an intranet application (DMS).
>>
>
> Even more dangerous.


Thats true ... but this is not the question at this moment. I need the
upload, because its an DMS :-) Everything else is or will be done with
max security - one thing ist the check of the upload itself and the
existing directory.

>> I have already try the laravel forum, but until now, i havent got an
>> answer. Maybe i try it again.

Laravel is in my eyes very smart and if you use it right, then you have
a very good basic security (php) app.

> Right, but that's why I was asking what you are trying to do. Perhaps
> we can find a different way of doing it.

One part of laravel is the internal validation - i havent found a way to
validate the not only the input, but also the directory structure...

Jan

Christoph M. Becker

לא נקראה,
30 בדצמ׳ 2016, 10:16:0830.12.2016
עד
I have no experience with Laravel, but maybe the following helps:
<https://laracasts.com/discuss/channels/general-discussion/l5-where-to-add-custom-validation-function>.

--
Christoph M. Becker

Härra Ramob

לא נקראה,
2 בינו׳ 2022, 6:49:432.1.2022
עד
ʕʘ̅͜ʘ̅ʔ

ʕʘ̅͜ʘ̅ʔ

ʕʘ̅͜ʘ̅ʔ

ʕʘ̅͜ʘ̅ʔ

ʕʘ̅͜ʘ̅ʔ

ʕʘ̅͜ʘ̅ʔ

ʕʘ̅͜ʘ̅ʔ

ʕʘ̅͜ʘ̅ʔ

ʕʘ̅͜ʘ̅ʔ

ʕʘ̅͜ʘ̅ʔ

ʕʘ̅͜ʘ̅ʔ

ʕʘ̅͜ʘ̅ʔ

ʕʘ̅͜ʘ̅ʔ

ʕʘ̅͜ʘ̅ʔ
0 הודעות חדשות