Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Jérome Perrin
erp5
Commits
c93e65e3
Commit
c93e65e3
authored
Jan 23, 2024
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
base64 WIP
parent
423f805e
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
9 additions
and
8 deletions
+9
-8
bt5/erp5_base/ModuleComponentTemplateItem/portal_components/module.erp5.TransformLib.py
...emplateItem/portal_components/module.erp5.TransformLib.py
+3
-2
bt5/erp5_corporate_identity/ExtensionTemplateItem/portal_components/extension.erp5.TemplateDocumentConversion.py
...l_components/extension.erp5.TemplateDocumentConversion.py
+1
-1
bt5/erp5_dms/TestTemplateItem/portal_components/test.erp5.testERP5WebWithDms.py
...ateItem/portal_components/test.erp5.testERP5WebWithDms.py
+1
-1
product/ERP5/bootstrap/erp5_core/MixinTemplateItem/portal_components/mixin.erp5.BaseExtensibleTraversableMixin.py
...l_components/mixin.erp5.BaseExtensibleTraversableMixin.py
+1
-1
product/ERP5OOo/transforms/oood_commandtransform.py
product/ERP5OOo/transforms/oood_commandtransform.py
+2
-2
product/ERP5Type/patches/CookieCrumbler.py
product/ERP5Type/patches/CookieCrumbler.py
+1
-1
No files found.
bt5/erp5_base/ModuleComponentTemplateItem/portal_components/module.erp5.TransformLib.py
View file @
c93e65e3
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
from
Products.PortalTransforms.interfaces
import
ITransform
from
Products.PortalTransforms.interfaces
import
ITransform
from
zope.interface
import
implementer
from
zope.interface
import
implementer
from
erp5.component.document.Document
import
DocumentConversionServerProxy
,
ConversionError
,
enc
,
dec
from
erp5.component.document.Document
import
DocumentConversionServerProxy
,
ConversionError
,
enc
,
dec
@
implementer
(
ITransform
)
@
implementer
(
ITransform
)
class
DocumentConversionServerTransform
:
class
DocumentConversionServerTransform
:
"""
"""
...
@@ -52,12 +53,12 @@ class DocumentConversionServerTransform:
...
@@ -52,12 +53,12 @@ class DocumentConversionServerTransform:
destination_format
=
self
.
_getFormatFromMimetype
(
self
.
output
)
destination_format
=
self
.
_getFormatFromMimetype
(
self
.
output
)
data
.
setData
(
dec
(
server_proxy
.
convertFile
(
data
.
setData
(
dec
(
server_proxy
.
convertFile
(
enc
(
orig
),
enc
(
orig
)
.
decode
()
,
source_format
,
source_format
,
destination_format
,
destination_format
,
# Default values are ConversionServer default ones
# Default values are ConversionServer default ones
kwargs
.
get
(
'zip'
,
False
),
kwargs
.
get
(
'zip'
,
False
),
kwargs
.
get
(
'refresh'
,
False
),
kwargs
.
get
(
'refresh'
,
False
),
kwargs
.
get
(
'conversion_kw'
,
{}))))
kwargs
.
get
(
'conversion_kw'
,
{}))
.
encode
()
))
return
data
return
data
\ No newline at end of file
bt5/erp5_corporate_identity/ExtensionTemplateItem/portal_components/extension.erp5.TemplateDocumentConversion.py
View file @
c93e65e3
...
@@ -48,7 +48,7 @@ def convertDocumentByConversionServer(
...
@@ -48,7 +48,7 @@ def convertDocumentByConversionServer(
proxy
=
DocumentConversionServerProxy
(
self
)
proxy
=
DocumentConversionServerProxy
(
self
)
return
b64decode
(
return
b64decode
(
proxy
.
convertFile
(
proxy
.
convertFile
(
b64encode
(
data
),
b64encode
(
data
)
.
decode
()
,
source_mimetype
,
source_mimetype
,
destination_mimetype
,
destination_mimetype
,
zip
,
zip
,
...
...
bt5/erp5_dms/TestTemplateItem/portal_components/test.erp5.testERP5WebWithDms.py
View file @
c93e65e3
...
@@ -1750,7 +1750,7 @@ return True
...
@@ -1750,7 +1750,7 @@ return True
)
)
published_page
.
publish
()
published_page
.
publish
()
self
.
tic
()
self
.
tic
()
auth_cookie
=
{
'__ac'
:
b64encode
(
'ERP5TypeTestCase:'
)}
auth_cookie
=
{
'__ac'
:
b64encode
(
b'ERP5TypeTestCase:'
).
decode
(
)}
# ERP5 portal, not through Caching Policy Manager
# ERP5 portal, not through Caching Policy Manager
response
=
requests
.
get
(
response
=
requests
.
get
(
...
...
product/ERP5/bootstrap/erp5_core/MixinTemplateItem/portal_components/mixin.erp5.BaseExtensibleTraversableMixin.py
View file @
c93e65e3
...
@@ -106,7 +106,7 @@ class BaseExtensibleTraversableMixin(ExtensibleTraversableMixin):
...
@@ -106,7 +106,7 @@ class BaseExtensibleTraversableMixin(ExtensibleTraversableMixin):
# this logic is copied from identify() in
# this logic is copied from identify() in
# AccessControl.User.BasicUserFolder.
# AccessControl.User.BasicUserFolder.
if
auth
and
auth
.
lower
().
startswith
(
'basic '
):
if
auth
and
auth
.
lower
().
startswith
(
'basic '
):
name
=
decodebytes
(
auth
.
split
(
' '
)[
-
1
]).
split
(
':'
,
1
)[
0
]
name
=
decodebytes
(
auth
.
split
(
' '
)[
-
1
]
.
encode
()).
decode
(
).
split
(
':'
,
1
)[
0
]
if
name
is
not
None
:
if
name
is
not
None
:
user
=
portal_membership
.
_huntUser
(
name
,
self
)
user
=
portal_membership
.
_huntUser
(
name
,
self
)
else
:
else
:
...
...
product/ERP5OOo/transforms/oood_commandtransform.py
View file @
c93e65e3
...
@@ -228,11 +228,11 @@ class OOOdCommandTransform(commandtransform):
...
@@ -228,11 +228,11 @@ class OOOdCommandTransform(commandtransform):
response_code
,
response_dict
,
message
=
server_proxy
.
run_generate
(
response_code
,
response_dict
,
message
=
server_proxy
.
run_generate
(
''
,
''
,
enc
(
self
.
data
),
enc
(
self
.
data
)
.
decode
()
,
None
,
None
,
format
,
format
,
self
.
mimetype
)
self
.
mimetype
)
data
=
dec
(
response_dict
[
'data'
])
data
=
dec
(
response_dict
[
'data'
]
.
encode
()
)
if
self
.
mimetype
==
'text/html'
:
if
self
.
mimetype
==
'text/html'
:
data
=
self
.
includeImageList
(
data
)
data
=
self
.
includeImageList
(
data
)
return
data
return
data
...
...
product/ERP5Type/patches/CookieCrumbler.py
View file @
c93e65e3
...
@@ -193,7 +193,7 @@ def credentialsChanged(self, user, name, pw, request=None):
...
@@ -193,7 +193,7 @@ def credentialsChanged(self, user, name, pw, request=None):
# <patch>
# <patch>
# We don't want new lines, so use base64.standard_b64encode instead of
# We don't want new lines, so use base64.standard_b64encode instead of
# base64.encodebytes
# base64.encodebytes
ac
=
standard_b64encode
(
'%s:%s'
%
(
name
,
pw
)).
rstrip
()
ac
=
standard_b64encode
(
(
'%s:%s'
%
(
name
,
pw
)).
encode
()).
rstrip
().
decode
()
# </patch>
# </patch>
method
=
self
.
getCookieMethod
(
'setAuthCookie'
,
method
=
self
.
getCookieMethod
(
'setAuthCookie'
,
self
.
defaultSetAuthCookie
)
self
.
defaultSetAuthCookie
)
...
...
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