[appengine-java] Just one server cookie in development mode?

2010-12-03 Thread OliWeiD
Hi all,

I discovered a problem during coding Google WebToolkit together with
appengine and according to my interpretation of my tests it's the
appengine part of it, which causes the problem. or the development
server of it.
I tried to follow the article
http://code.google.com/intl/de-DE/webtoolkit/articles/security_for_gwt_applications.html
and implement a server cookie to compare it with the its content sent
via RPC. To get access to the cookies I overlayed the service method.

protected void service(HttpServletRequest hreq, HttpServletResponse
hres)
throws IOException, ServletException {
req = hreq;
Cookie[] cookies = req.getCookies();
if (cookies != null) {
for (int i = 0; i  cookies.length; i++) {
if (cookies[i] != null
 
MYCOOKIEID.equals(cookies[i].getName())) {
sessionClient = cookies[i].getValue();
}
}
}

super.service(hreq, hres);

if (sessionServer != null) {
Cookie cookie = new Cookie(MYCOOKIEID,  + 
sessionServer);
cookie.setComment(Session-Cookie for 
myapp.example.com);
// cookie.setPath(/);
cookie.setMaxAge(-1);
hres.addCookie(cookie);
}
}

This is working as long as I don't try to use the login capability as
described in
http://code.google.com/intl/de-DE/webtoolkit/doc/latest/tutorial/appengine.html#user

Once logged in there is a cookie named dev_appserver_login,
my cookie, which was working without login, seems to vanish on the
server side of the development server.

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[google-appengine] Re: datastore query ignoring filter argument.

2009-04-05 Thread OliWeiD

I didn't get it to work, so I created a workaround:
Two additional fields linked to the next or previous key name.
These links are updated by for loop over the sequence.
If I get more pictures or I have to be more dynamic with the sequence
I have to add some more logic to keep the links updated
with a single operation instead of a big loop.
Grace to the initial concern it's a poor workaround.

On 2 Apr., 20:39, OliWeiD oliver.weimar.dr...@googlemail.com wrote:
 Hi Jeff,

 Example: I'm looking at picture 1, so I pass 1 to img_next.
 I want to have the next sequence  1 (e.g. 2)
 and of cause it's ordered ascending.

 As long as the filter sequence   or sequence   is in,
 the result is empty.

 Hope that answers your questions.

 Thank you

 OliWeiD.

 On 2 Apr., 19:05, Jeff S j...@google.com wrote:



  Hi OliWeiD,

  The  in your filter looks a bit suspicious. The default ordering
  direction is ascending, and since you order on sequence ascending,
  should the inequality be ? I'm not sure what img_next signifies.

  Thank you,

  Jeff

  On Apr 1, 10:44 am, OliWeiD oliver.weimar.dr...@googlemail.com
  wrote:

   The following query is not working normal:
               q = Photo.all().filter('viewer = ', True) \
                       .filter('sequence  ', img_next) \
                       .order('sequence').order('__key__')
   the query is returning nothing,
   but when the filter(sequence ) is not in, the first image is
   retrieved.
   Thanks in advance for any hint..OliWeiD- Zitierten Text ausblenden -

  - Zitierten Text anzeigen -- Zitierten Text ausblenden -

 - Zitierten Text anzeigen -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] datastore query ignoring filter argument.

2009-04-01 Thread OliWeiD

The following query is not working normal:
q = Photo.all().filter('viewer = ', True) \
.filter('sequence  ', img_next) \
.order('sequence').order('__key__')
the query is returning nothing,
but when the filter(sequence ) is not in, the first image is
retrieved.
Thanks in advance for any hint..OliWeiD
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Datastore newbie question

2009-03-23 Thread OliWeiD

When I start on a (german) windows-xp with that options I get the
following messages (edited)

INFO 2009-03-23 20:19:15,861 appengine_rpc.py] Server:
appengine.google.com
INFO 2009-03-23 20:19:15,908 dev_appserver.py] Attempting to
remove file at c:\dokume~1\myname\lokale~1\temp
\dev_appserver.datastore
INFO 2009-03-23 20:19:15,908 dev_appserver.py] Attempting to
remove file at c:\dokume~1\myname\lokale~1\temp
\dev_appserver.datastore.history
WARNING  2009-03-23 20:19:15,908 datastore_file_stub.py] Could not
read datastore data from c:\dokume~1\myname\lokale~1\temp
\dev_appserver.datastore
WARNING  2009-03-23 20:19:15,908 datastore_file_stub.py] Could not
read datastore data from c:\dokume~1\myname\lokale~1\temp
\dev_appserver.datastore.history
WARNING  2009-03-23 20:19:16,174 dev_appserver.py] Could not
initialize images API; you are likely missing the Python PIL module.
ImportError: No module named _imaging
INFO 2009-03-23 20:19:17,065 dev_appserver_main.py] Running
application helloworld on port : http://localhost:

Telling first: tried to delete, and then could not read, so the
deletion was successful and everything is ok.
If you don't have the INFO message about trying, may be there aren't
any datastore files.
Otherwise the message should tell you, where it is searching for the
files.

Hope that helps

OliWeiD.
On 23 Mrz., 16:18, Nora noorhanab...@yahoo.co.uk wrote:
 Could you please tell me where is this datastore storedI tried to
 test with some data but I am unable to clear its contents.  I used the
 --clear_datastore option but I keep getting the message that it is
 unable to find the datastore files!

 Thank you very much,
 Nora

 On Mar 20, 5:49 pm, Pavel Byles pavelby...@gmail.com wrote:



  You can use the bulkloader to initialize your 
  data:http://code.google.com/appengine/docs/python/tools/uploadingdata.html

  -Pavel

  On Mar 19, 1:57 pm, Nora noorhanab...@yahoo.co.uk wrote:

   Hello,
   As I haven't used data stores before, I am unable to imagine how it is
   going to behave:)  I have some text files and I want to store its
   contents in datastores.  Do I load thedatastoreat the beginning and
   then upload my application and use the data in thedatastorefrom
   there? Or do we fill thedatastoreup every time my applicaiton gets a
   request for it?  Is the data saved in a certain file so when the
   application is uploaded on the google server, this file is transfered
   on the server and I start to use it from there?

   Thank you very much,
   N.- Hide quoted text -

  - Show quoted text -- Zitierten Text ausblenden -

 - Zitierten Text anzeigen -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: App Engine SDK Cheat Sheet

2009-03-13 Thread OliWeiD

Well done, it saves me some time in switching through the appengin
docs.

On Mar 11, 7:44 pm, John skid...@google.com wrote:
 Hi All,

 Not sure if you saw the blog post this morning, but we created a cheat
 sheet:

 http://googleappengine.googlecode.com/files/google_app_engine_cheat_s...

 We'd love your feedback. Feel free to post it on this thread.

 If you're attending SxSW, please say hello!

 Cheers,

 John
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: HTTPS pages with some unencrypted information

2009-03-06 Thread OliWeiD

As my pages are still very simple, there was no media tab within Tools-
page info,
but some maybe-useful stuff in the page info, thanks for the hint.
Also working with the firebug hasn't found me the error.

I even had a file without javascript, where I had the issue. And
within the comparison
with pages without that issue I found it: the css file and the
javascript file
are coming from a static directory, after a secure: always into the
app.yaml
the error has vanished.

thanks for the hints nevertheless, I've learnd more about firefox
today ;-)

On 6 Mrz., 09:08, bd_ bdon...@gmail.com wrote:
 On Mar 6, 1:22 am, OliWeiD oliver.weimar.dr...@googlemail.com wrote:

  Hi,

  I have setup some pages in app.yaml with secure: always and some few
  are getting the following warn message in e.g. Firefox (IE7 is
  similar):
  You have requested an encrypted page that contains some unencrypted
  information. Information that you see or enter on this page could
  easily be read by a third party.

  Is there a plug in or something to identify, which elements are
  unencrypted?
  Or a list of hints to check?

 Tools-page info-media
 Look for anything not coming through https.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Is there a handler for logout?

2009-03-05 Thread OliWeiD

what is the difference between / and self.request.get('url' '/' ) ?
is it the full address? (Yes, I will try later this evening :-)

On Mar 5, 1:10 am, pedepy paul.ro...@gmail.com wrote:
 yes i was gonna say, keeping track of the original URL in a logout
 operation is probably not important, as you most likely want to simply
 redirect to home page. (this can also make the user more 'secure' that
 his session has indeed been properly terminated if its important to
 your app)..

 here's my way, pretty similar:

 class LogoutHandler(BaseHandler):
       def get(self ):
           self.redirect( users.create_logout_url( self.request.get
 ( 'uri', '/' ) ) )

 On Mar 4, 1:45 pm, OliWeiD oliver.weimar.dr...@googlemail.com wrote:



  Hi Paul,

  after multiple trials I found a way which is working:
  1) as link I'm using now /logout
  2) the following handler is answering to it (typical stuff in app.yaml
  and wsgi application)
  class LogoutHelper(webapp.RequestHandler):
      def get(self):
          usr = users.get_current_user()
          if not usr:
              self.redirect(/)
              return
          # HERE I'M DOING THE CLEANUP STUFF
          url = users.create_logout_url(/)
          self.redirect(url)

  Thanks for the hints!
  Kind Regards
  Oliver W-D

  On 4 Mrz., 15:31, Paul Roy paul.ro...@gmail.com wrote:

   yep well turns out this is exactly what im doing. but i dont see this  
   as generating a blank page. i have to try out the code i suggested  
   yesterday.

   and i did make it home, thx :)

   Sent from my iPhone

   On 09-03-04, at 01:28, OliWeiD oliver.weimar.dr...@googlemail.com  
   wrote:

Well, I've got the idea.

But I put the logout-uri into the html sitting on the page.
With your idea in mind, don't I need a blank page,
doing the del session stuff and then logout, passing the correct
logout uri
as an argument to that blank page??

Now I have to go to the train, hopefully you get, where you want to
go.

Oliver W.D.

On 4 Mrz., 06:26, Paul Roy paul.ro...@gmail.com wrote:
perhaps, instead of using the users' method directly, create a logout
handler where you perform the necessary operations before fowarding  
to
the logout uri.

the tricky part is keeping track of the original uri. the way i do  
it,
is to pass it as a request argument. you could maybe subclass the
request handler, with a logout method. such as:

def logout(self, uri=None):
    check that there really is a user logged in

    if uri is None: uri = self.request.uri #not sure this part  
works..

    del session and stuff..

    self.redirect(user.logout(uri))

..

im not 100% sure about this since im just typing this on my phone  
50ft
underground in a speeding subway train with nothing to refer to, but
you should get the idea.

when i get home ill see what code i use exactly.. ;)

ps i actually just missed my stop! lol.. damn you google!! (shakes  
fist)

Sent from my iPhone

On 09-03-04, at 00:01, OliWeiD oliver.weimar.dr...@googlemail.com
wrote:

Hi everybody,

due to security reasons and for efficiency some sort of logout  
handler
is needed.
That means, when the user is clicking on the created logout link
(users.create_logout_url)
During that logout I want to delete a session cookie and delete the
memcache entries for that user.

Any idea?
Kind Regards
Oliver W-D.- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Is there a handler for logout?

2009-03-05 Thread OliWeiD

Cool, that makes sense.
Thank you again.

On 6 Mrz., 01:30, Paul Roy paul.ro...@gmail.com wrote:
 oh the only difference is that if I ever choose to pass the logout handler
 an url 'value' it should be what it redirects it to, otherwise default to
 '/'

 for instance,www.mysite.com/logout?url=/somethingit will redirect to
 /something .. thats probably more useful in login situations though where
 you obviously want the user to be returned to exactly where he was...

 On Thu, Mar 5, 2009 at 10:37 AM, OliWeiD oliver.weimar.dr...@googlemail.com

  wrote:

  what is the difference between / and self.request.get('url' '/' ) ?
  is it the full address? (Yes, I will try later this evening :-)

  On Mar 5, 1:10 am, pedepy paul.ro...@gmail.com wrote:
   yes i was gonna say, keeping track of the original URL in a logout
   operation is probably not important, as you most likely want to simply
   redirect to home page. (this can also make the user more 'secure' that
   his session has indeed been properly terminated if its important to
   your app)..

   here's my way, pretty similar:

   class LogoutHandler(BaseHandler):
         def get(self ):
             self.redirect( users.create_logout_url( self.request.get
   ( 'uri', '/' ) ) )

   On Mar 4, 1:45 pm, OliWeiD oliver.weimar.dr...@googlemail.com wrote:

Hi Paul,

after multiple trials I found a way which is working:
1) as link I'm using now /logout
2) the following handler is answering to it (typical stuff in app.yaml
and wsgi application)
class LogoutHelper(webapp.RequestHandler):
    def get(self):
        usr = users.get_current_user()
        if not usr:
            self.redirect(/)
            return
        # HERE I'M DOING THE CLEANUP STUFF
        url = users.create_logout_url(/)
        self.redirect(url)

Thanks for the hints!
Kind Regards
Oliver W-D

On 4 Mrz., 15:31, Paul Roy paul.ro...@gmail.com wrote:

 yep well turns out this is exactly what im doing. but i dont see this

 as generating a blank page. i have to try out the code i suggested

 yesterday.

 and i did make it home, thx :)

 Sent from my iPhone

 On 09-03-04, at 01:28, OliWeiD oliver.weimar.dr...@googlemail.com

 wrote:

  Well, I've got the idea.

  But I put the logout-uri into the html sitting on the page.
  With your idea in mind, don't I need a blank page,
  doing the del session stuff and then logout, passing the correct
  logout uri
  as an argument to that blank page??

  Now I have to go to the train, hopefully you get, where you want to
  go.

  Oliver W.D.

  On 4 Mrz., 06:26, Paul Roy paul.ro...@gmail.com wrote:
  perhaps, instead of using the users' method directly, create a
  logout
  handler where you perform the necessary operations before
  fowarding
  to
  the logout uri.

  the tricky part is keeping track of the original uri. the way i do

  it,
  is to pass it as a request argument. you could maybe subclass the
  request handler, with a logout method. such as:

  def logout(self, uri=None):
      check that there really is a user logged in

      if uri is None: uri = self.request.uri #not sure this part
  works..

      del session and stuff..

      self.redirect(user.logout(uri))

  ..

  im not 100% sure about this since im just typing this on my phone

  50ft
  underground in a speeding subway train with nothing to refer to,
  but
  you should get the idea.

  when i get home ill see what code i use exactly.. ;)

  ps i actually just missed my stop! lol.. damn you google!! (shakes

  fist)

  Sent from my iPhone

  On 09-03-04, at 00:01, OliWeiD 
  oliver.weimar.dr...@googlemail.com
  wrote:

  Hi everybody,

  due to security reasons and for efficiency some sort of logout
  handler
  is needed.
  That means, when the user is clicking on the created logout link
  (users.create_logout_url)
  During that logout I want to delete a session cookie and delete
  the
  memcache entries for that user.

  Any idea?
  Kind Regards
  Oliver W-D.- Hide quoted text -

   - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] HTTPS pages with some unencrypted information

2009-03-05 Thread OliWeiD

Hi,

I have setup some pages in app.yaml with secure: always and some few
are getting the following warn message in e.g. Firefox (IE7 is
similar):
You have requested an encrypted page that contains some unencrypted
information. Information that you see or enter on this page could
easily be read by a third party.

Is there a plug in or something to identify, which elements are
unencrypted?
Or a list of hints to check?

Thanks in advance

Oliver W-D
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Is there a handler for logout?

2009-03-04 Thread OliWeiD

Hi Paul,

after multiple trials I found a way which is working:
1) as link I'm using now /logout
2) the following handler is answering to it (typical stuff in app.yaml
and wsgi application)
class LogoutHelper(webapp.RequestHandler):
def get(self):
usr = users.get_current_user()
if not usr:
self.redirect(/)
return
# HERE I'M DOING THE CLEANUP STUFF
url = users.create_logout_url(/)
self.redirect(url)

Thanks for the hints!
Kind Regards
Oliver W-D

On 4 Mrz., 15:31, Paul Roy paul.ro...@gmail.com wrote:
 yep well turns out this is exactly what im doing. but i dont see this  
 as generating a blank page. i have to try out the code i suggested  
 yesterday.

 and i did make it home, thx :)

 Sent from my iPhone

 On 09-03-04, at 01:28, OliWeiD oliver.weimar.dr...@googlemail.com  
 wrote:



  Well, I've got the idea.

  But I put the logout-uri into the html sitting on the page.
  With your idea in mind, don't I need a blank page,
  doing the del session stuff and then logout, passing the correct
  logout uri
  as an argument to that blank page??

  Now I have to go to the train, hopefully you get, where you want to
  go.

  Oliver W.D.

  On 4 Mrz., 06:26, Paul Roy paul.ro...@gmail.com wrote:
  perhaps, instead of using the users' method directly, create a logout
  handler where you perform the necessary operations before fowarding  
  to
  the logout uri.

  the tricky part is keeping track of the original uri. the way i do  
  it,
  is to pass it as a request argument. you could maybe subclass the
  request handler, with a logout method. such as:

  def logout(self, uri=None):
      check that there really is a user logged in

      if uri is None: uri = self.request.uri #not sure this part  
  works..

      del session and stuff..

      self.redirect(user.logout(uri))

  ..

  im not 100% sure about this since im just typing this on my phone  
  50ft
  underground in a speeding subway train with nothing to refer to, but
  you should get the idea.

  when i get home ill see what code i use exactly.. ;)

  ps i actually just missed my stop! lol.. damn you google!! (shakes  
  fist)

  Sent from my iPhone

  On 09-03-04, at 00:01, OliWeiD oliver.weimar.dr...@googlemail.com
  wrote:

  Hi everybody,

  due to security reasons and for efficiency some sort of logout  
  handler
  is needed.
  That means, when the user is clicking on the created logout link
  (users.create_logout_url)
  During that logout I want to delete a session cookie and delete the
  memcache entries for that user.

  Any idea?
  Kind Regards
  Oliver W-D.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Is there a handler for logout?

2009-03-03 Thread OliWeiD

Hi everybody,

due to security reasons and for efficiency some sort of logout handler
is needed.
That means, when the user is clicking on the created logout link
(users.create_logout_url)
During that logout I want to delete a session cookie and delete the
memcache entries for that user.

Any idea?
Kind Regards
Oliver W-D.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Munich or how to setup a multi-language project

2009-03-01 Thread OliWeiD

Hi,

I've made some additional research and found, that it's partially
solved with the app.yaml.
In the app.yaml you can put an entry /munich and /muenchen to it,
and I don't want to use the uuml; german umlaut, because it looks bad
in the address line.

In the munich.py I can use now with in the get routine the
self.request.path variable
to distinguish between the two languages and set a user preference.

So the static way is solved, but for dynamically mapping paths I'm
still searching.

OliWeiD.


On 28 Feb., 17:56, OliWeiD oliver.weimar.dr...@googlemail.com wrote:
 Hi

 Given a directory and file /germany/munich.py to
 display ???.appspot.com/germany/munich .
 In German language that would be either ???.appspot.com/deutschland/
 muuml;nchen or ???.appspot.com/deutschland/muenchen .

 Now i want to use the same code and the same directory. Is there a
 possibility to map the german name to the English path and file?
 but at the same time to let munich.py recognize it's the German path?

 Thank you in advance for your input.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Munich or how to setup a multi-language project

2009-02-28 Thread OliWeiD

Hi

Given a directory and file /germany/munich.py to
display ???.appspot.com/germany/munich .
In German language that would be either ???.appspot.com/deutschland/
muuml;nchen or ???.appspot.com/deutschland/muenchen .

Now i want to use the same code and the same directory. Is there a
possibility to map the german name to the English path and file?
but at the same time to let munich.py recognize it's the German path?

Thank you in advance for your input.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---