Posts

Featured post

AWS S3 The security of a signed URL as a hyperlink -

is safe? maintaining security using pre-signed url aws s3 bucket object? <a href="https://mywebsite.s3.amazonaws.com/40.pdf?awsaccesskeyid=[my access key]&expires=1433297453&signature=[this random set of numbers]">my link</a> another words - part 1... say i'm storing bunch of separate individual's files in bucket. want provide link file user. obviously, each file uniquely consecutively named, don't want people able change link 40.pdf 30.pdf , different file. url seems that. part 2, , more importantly.... is safe or dangerous method of displaying url in terms of security of bucket? clearly, giving away "access key" here, of course, not "secret". already answered 3 years ago... sorry. how secure amazon aws access keys? aws security credentials used when making api calls aws. consist of 2 components: access key (eg akiaisemtxnog4abpc6q ): similar username. okay people see it. secret key : long s...

mysql startup shell problems -

since met many startup errors,i decide analyze mysql startup shell.while code fragment cannot understand clearly. version: mysql ver 14.14 distrib 5.5.43, osx10.8 (i386) using readline 5.1 368 # 369 # first, try find basedir , ledir (where mysqld is) 370 # 372 if echo '/usr/local/mysql/share' | grep '^/usr/local/mysql' > /dev/null 373 374 relpkgdata= echo '/usr/local/mysql/share' | sed -e 's,^/usr/local/mysql,,' -e 's,^/,,' -e 's,^,./,' 375 else 376 # pkgdatadir not relative prefix 377 relpkgdata='/usr/local/mysql/share' 378 fi what's purpose of line 372? little weird any appreciated. at first glance, strange indeed... here's solution mystery. 372: if echo '/usr/local/mysql/share' | grep '^/usr/local/mysql' > /dev/null 373: grep returns true if matches , false if doesn't, testing whether string /usr/local/mysql/share begins ( ^ ) /usr/local/mysql . o...

java - How do I verify that the ETag is valid if the user does not pass If-None-Match? -

my first time ever hearing of 'etag'. have been able determine system i'm on, system uses etags validate item being submitted has not been altered prior submission of changes. if user has modified item system responds etag invalid. users using rest services had been created project , have not been altered in couple years. i'm working on jira based java application has rest services plugins. now in regards etag, i'm @ loss here. our security scan on system marks header etag risk injection of code. perhaps i'm over-thinking but, is etag created , set code in application or created tomcat server? am take value of etag , compare make sure valid? how validate value etag valid? where validation occur if if-none-match provided request? how protect injection? i've been reading posts on forum things dealing etag i'm not understanding what/how etag step 1 whatever last step is. could use reference how i'm code this. listing resources find: ...

How to copy Excel text and keep line breaks -

i have excel (2013) spreadsheet contains multiline text in of cells. word-wrap enabled cells, appear line breaks correctly. however, cells in question protected (and don't have password), can't click edit box copy there. if use ctrl-c copy clipboard, paste notepad, line breaks removed , double quotes placed around text. how can copy out text , keep line breaks? notepad doesn't interpret line breaks cleverly more fully-featured text editors. best bet try copy/pasting either wordpad, or download notepad++ ( https://notepad-plus-plus.org/download/ ) , paste first. this answer nice job of further explaining issue: https://superuser.com/questions/362087/notepad-ignoring-linebreaks

twitter bootstrap - nav menu not selected correctly -

Image
i created vertical menu nav bar work fine except drop down button. it don't seem able active. active state keep on previous item clicked. i don't use javascript <ul class="nav nav-pills nav-stacked"> <li id="contact" role="presentation" data-toggle="tab" class="active"><a href="#"><span class="glyphicon glyphicon-user"></span> dossier personnel</a></li> <li id="appointment" role="presentation" data-toggle="tab"><a href="#"><span class="glyphicon glyphicon-calendar"></span> rendez-vous</a></li> <li id="room" role="presentation" data-toggle="tab"><a href="#"><span class="glyphicon glyphicon-bed"></span> chambre</a></li> <li id="task" role="presentation" data-to...

javascript - Recursive method for checking an object -

so have created constructor attempting prototype. want method checks through each property in object see if empty , if returns key. if property object want check through sub object well. updated: my code far: function properties(val1, val2, val3, val4){ this.prop1 = val1 || ""; this.prop2 = val2 || ""; this.prop3 = val3 || ""; this.prop4 = val4 || {}; } properties.prototype = { isempty: function(){ (key in this) { if(typeof this[key] == "object" && this[key] !== null){ this[key].isempty(); } else { if(!this[key]){ console.log(key); } } } } } var test = new properties("something", "", "", {subprop1: "something else", subprop2: "", subprop3: {subsubprop1: "", subsubprop2: "" }}); the method should return prop2, pro...

PHP/Javascript/AJAX - Redirect page with a form, and then submit it -

i've been making webpage gathers tweets depending on input on form , i'm having problems using default form submit. i want change how form submit works might take ages page redirect , give user token id, due php script executing. make things simple thought best way make faster redirecting , submitting form. unfortunately don't think can php. someone recommended me give @ ajax, didn't how me. this how form looks like: <form action="testing.php" method="post"> <input type="text" name="search" value="" placeholder="all of these words" autofocus/><br> <input type="text" name="search2" value="" placeholder="this exact word or phrase" /><br> <input type="text" name="search3" value="" placeholder="any of these words" /><br> <input type="text" name="sear...