Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #17242 > unrolled thread
| Started by | Jan Novak <repcom@gmail.com> |
|---|---|
| First post | 2016-12-29 17:55 +0100 |
| Last post | 2022-01-02 03:49 -0800 |
| Articles | 7 — 4 participants |
Back to article view | Back to comp.lang.php
laravel validation Jan Novak <repcom@gmail.com> - 2016-12-29 17:55 +0100
Re: laravel validation Jerry Stuckle <jstucklex@attglobal.net> - 2016-12-29 13:19 -0500
Re: laravel validation Jan Novak <repcom@gmail.com> - 2016-12-30 08:58 +0100
Re: laravel validation Jerry Stuckle <jstucklex@attglobal.net> - 2016-12-30 08:56 -0500
Re: laravel validation Jan Novak <repcom@gmail.com> - 2016-12-30 16:03 +0100
Re: laravel validation "Christoph M. Becker" <cmbecker69@arcor.de> - 2016-12-30 16:16 +0100
Re: laravel validation Härra Ramob <y6655442211@gmail.com> - 2022-01-02 03:49 -0800
| From | Jan Novak <repcom@gmail.com> |
|---|---|
| Date | 2016-12-29 17:55 +0100 |
| Subject | laravel validation |
| Message-ID | <o43f5s$dr2$1@news.albasani.net> |
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
[toc] | [next] | [standalone]
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Date | 2016-12-29 13:19 -0500 |
| Message-ID | <o43k0e$385$1@jstuckle.eternal-september.org> |
| In reply to | #17242 |
On 12/29/2016 11:55 AM, Jan Novak wrote: > 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 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 jstucklex@attglobal.net ==================
[toc] | [prev] | [next] | [standalone]
| From | Jan Novak <repcom@gmail.com> |
|---|---|
| Date | 2016-12-30 08:58 +0100 |
| Message-ID | <o45441$sml$1@news.albasani.net> |
| In reply to | #17244 |
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
[toc] | [prev] | [next] | [standalone]
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Date | 2016-12-30 08:56 -0500 |
| Message-ID | <o45ov4$rp9$1@jstuckle.eternal-september.org> |
| In reply to | #17245 |
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. -- ================== Remove the "x" from my email address Jerry Stuckle jstucklex@attglobal.net ==================
[toc] | [prev] | [next] | [standalone]
| From | Jan Novak <repcom@gmail.com> |
|---|---|
| Date | 2016-12-30 16:03 +0100 |
| Message-ID | <o45svt$trb$1@news.albasani.net> |
| In reply to | #17246 |
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
[toc] | [prev] | [next] | [standalone]
| From | "Christoph M. Becker" <cmbecker69@arcor.de> |
|---|---|
| Date | 2016-12-30 16:16 +0100 |
| Message-ID | <o45tnj$pks$1@solani.org> |
| In reply to | #17242 |
On 29.12.2016 at 17:55, Jan Novak wrote: > 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 ? 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
[toc] | [prev] | [next] | [standalone]
| From | Härra Ramob <y6655442211@gmail.com> |
|---|---|
| Date | 2022-01-02 03:49 -0800 |
| Message-ID | <301a5d66-9b67-41bb-aee5-fa44baba0656n@googlegroups.com> |
| In reply to | #17248 |
Christoph M. Becker kirjutas Reede, 30. detsember 2016 kl 17:16:08 UTC+2: > On 29.12.2016 at 17:55, Jan Novak wrote: > > > 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 ? > 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 ʕʘ̅͜ʘ̅ʔ ʕʘ̅͜ʘ̅ʔ ʕʘ̅͜ʘ̅ʔ ʕʘ̅͜ʘ̅ʔ ʕʘ̅͜ʘ̅ʔ ʕʘ̅͜ʘ̅ʔ ʕʘ̅͜ʘ̅ʔ ʕʘ̅͜ʘ̅ʔ ʕʘ̅͜ʘ̅ʔ ʕʘ̅͜ʘ̅ʔ ʕʘ̅͜ʘ̅ʔ ʕʘ̅͜ʘ̅ʔ ʕʘ̅͜ʘ̅ʔ ʕʘ̅͜ʘ̅ʔ
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.php
csiph-web