From 42d765400991cfcc727f6f44f784ce3f37c6450f Mon Sep 17 00:00:00 2001 From: Mark Walker Date: Mon, 7 Sep 2015 11:51:54 -0700 Subject: [PATCH 1/4] Fix issue #1047 rotate 90 degrees on iOS Safari The iOS version of webkit still requires the browser prefixes for transform, see http://stackoverflow.com/a/27304061/4414220 --- src/octoprint/static/less/octoprint.less | 1 + 1 file changed, 1 insertion(+) diff --git a/src/octoprint/static/less/octoprint.less b/src/octoprint/static/less/octoprint.less index ab276cb5..28ec2a82 100644 --- a/src/octoprint/static/less/octoprint.less +++ b/src/octoprint/static/less/octoprint.less @@ -914,6 +914,7 @@ textarea.block { } .rotate90 { + -webkit-transform: rotate(-90deg); transform: rotate(-90deg); } From d3abeed3a9ecdc538f11fc8c8b12909fecf5e21f Mon Sep 17 00:00:00 2001 From: Mark Walker Date: Mon, 7 Sep 2015 17:19:16 -0700 Subject: [PATCH 2/4] Update changelog for 42d754 fix for #1047 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b19a999..1cf331cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -47,6 +47,8 @@ * It's not possible anymore to select files that are not machinecode files (e.g. GCODE) for printing on the file API. * Changes to a user's personal settings via the UI now propagate across sessions. +* [#1047](https://github.com/foosel/OctoPrint/issues/1047) - Fixed 90 degree + webcam rotation for iOS Safari. ## 1.2.6 (2015-09-02) From b7c9949caf871df5394b7a2464b3e509fb8e5e31 Mon Sep 17 00:00:00 2001 From: Mark Bastiaans Date: Tue, 8 Sep 2015 11:35:53 +0200 Subject: [PATCH 3/4] Fixed checks with os.path.realpath() for systems with symlinked paths --- src/octoprint/settings.py | 2 +- src/octoprint/slicing/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/octoprint/settings.py b/src/octoprint/settings.py index d3cc45c8..bde8b1cd 100644 --- a/src/octoprint/settings.py +++ b/src/octoprint/settings.py @@ -1072,7 +1072,7 @@ class Settings(object): def saveScript(self, script_type, name, script): script_folder = self.getBaseFolder("scripts") filename = os.path.realpath(os.path.join(script_folder, script_type, name)) - if not filename.startswith(script_folder): + if not filename.startswith(os.path.realpath(script_folder)): # oops, jail break, that shouldn't happen raise ValueError("Invalid script path to save to: {filename} (from {script_type}:{name})".format(**locals())) diff --git a/src/octoprint/slicing/__init__.py b/src/octoprint/slicing/__init__.py index 64a34ba1..7812fec5 100644 --- a/src/octoprint/slicing/__init__.py +++ b/src/octoprint/slicing/__init__.py @@ -585,7 +585,7 @@ class SlicingManager(object): name = self._sanitize(name) path = os.path.join(self.get_slicer_profile_path(slicer), "{name}.profile".format(name=name)) - if not os.path.realpath(path).startswith(self._profile_path): + if not os.path.realpath(path).startswith(os.path.realpath(self._profile_path)): raise IOError("Path to profile {name} tried to break out of allows sub path".format(**locals())) if must_exist and not (os.path.exists(path) and os.path.isfile(path)): raise UnknownProfile(slicer, name) From 406fe75bc483d943c34366636ed6d0c0b1ebb12f Mon Sep 17 00:00:00 2001 From: Mark Bastiaans Date: Tue, 8 Sep 2015 13:14:43 +0200 Subject: [PATCH 4/4] Added name to authors --- AUTHORS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS.md b/AUTHORS.md index 0309fdf5..62af6002 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -53,6 +53,7 @@ date of first contribution): * [Andrew Erickson](https://github.com/aerickson) * [Nicanor Romero Venier](https://github.com/nicanor-romero) * [Thomas Hou](https://github.com/masterhou) + * [Mark Bastiaans](https://github.com/markbastiaans) OctoPrint started off as a fork of [Cura](https://github.com/daid/Cura) by [Daid Braam](https://github.com/daid). Parts of its communication layer and