Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Carlos Ramos Carreño
slapos.core
Commits
3a667463
Commit
3a667463
authored
Aug 05, 2013
by
Romain Courteaud
🐸
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use SimpleQuery to protect against bad parameters from client.
parent
5d173c35
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/Person_findPartition.xml
...teItem/portal_skins/slapos_cloud/Person_findPartition.xml
+4
-3
master/bt5/slapos_cloud/bt/revision
master/bt5/slapos_cloud/bt/revision
+1
-1
No files found.
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/Person_findPartition.xml
View file @
3a667463
...
...
@@ -53,6 +53,7 @@
<value>
<string
encoding=
"cdata"
>
<![CDATA[
import random\n
from Products.ZSQLCatalog.SQLCatalog import SimpleQuery\n
person = context\n
\n
computer_partition = None\n
...
...
@@ -75,17 +76,17 @@ else:\n
explicit_location = False\n
if "computer_guid" in filter_kw:\n
explicit_location = True\n
query_kw["parent_reference"] =
filter_kw.pop("computer_guid"
)\n
query_kw["parent_reference"] =
SimpleQuery(parent_reference=filter_kw.pop("computer_guid")
)\n
\n
if "instance_guid" in filter_kw:\n
explicit_location = True\n
portal = context.getPortalObject()\n
instance_guid = filter_kw.pop("instance_guid")\n
query_kw["aggregate_related_reference"] =
instance_guid
\n
query_kw["aggregate_related_reference"] =
SimpleQuery(aggregate_related_reference=filter_kw.pop("instance_guid"))
\n
\n
if \'network_guid\' in filter_kw:\n
network_guid = filter_kw.pop(\'network_guid\')\n
query_kw["default_subordination_reference"] =
network_guid
\n
query_kw["default_subordination_reference"] =
SimpleQuery(default_subordination_reference=filter_kw.pop("network_guid"))
\n
\n
computer_base_category_list = [\n
\'group\',\n
...
...
master/bt5/slapos_cloud/bt/revision
View file @
3a667463
289
\ No newline at end of file
290
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment